:root {
  --navy: #121a33;
  --navy2: #1b274b;
  --blue: #2f6fed;
  --bg: #f4f7fb;
  --text: #182033;
  --muted: #6b7280;
  --line: #e2e8f0;
  --white: #fff;
  --red: #d92d20;
  --amber: #b54708;
  --green: #067647;
}

/* DEFECT LIBRARY V1.9.0 */
.panel.dashboard-library-card {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-color: #cfdcf2;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(47, 111, 237, 0.1),
      transparent 34%
    ),
    #fff;
}

.dashboard-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-library-header h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.dashboard-library-header p,
.library-page-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-library-header .page-actions,
.library-page-heading .page-actions {
  flex: 0 0 auto;
  margin: 0;
}

.dashboard-library-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-library-metrics > div {
  padding: 13px 15px;
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.84);
}

.dashboard-library-metrics span,
.dashboard-library-recent > strong,
.library-case-overview span,
.library-case-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-library-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.dashboard-library-recent {
  display: grid;
  gap: 2px;
}

.dashboard-library-recent > strong {
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-library-recent > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.dashboard-library-recent > a:last-child {
  border-bottom: 0;
}

.dashboard-library-recent > a > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-library-recent small {
  color: var(--muted);
}

.library-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: -8px 0 18px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.library-breadcrumb a {
  color: #245bc7;
  font-weight: 700;
  text-decoration: none;
}

.library-breadcrumb > span:last-child {
  max-width: min(460px, 50vw);
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.page-heading.library-page-heading,
.page-heading.library-case-heading {
  gap: 22px;
}

.metrics.library-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-metrics small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.library-search-panel {
  padding: 18px;
}

.library-filter-form {
  display: grid;
  gap: 14px;
}

.library-filter-form label,
.library-form-grid label,
.library-attachment-upload > label:not(.library-upload-dropzone) {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.library-filter-form input,
.library-filter-form select,
.library-inline-search input,
.library-form-grid input,
.library-form-grid select,
.library-form-grid textarea,
.library-attachment-upload input,
.library-admin-grid input,
.library-admin-grid select,
.library-admin-edit input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.library-filter-form input:focus,
.library-filter-form select:focus,
.library-inline-search input:focus,
.library-form-grid input:focus,
.library-form-grid select:focus,
.library-form-grid textarea:focus,
.library-attachment-upload input:focus,
.library-admin-grid input:focus,
.library-admin-grid select:focus,
.library-admin-edit input:focus {
  border-color: #84adff;
  outline: 3px solid rgba(47, 111, 237, 0.14);
}

.library-search-field input {
  min-height: 50px;
  padding-inline: 15px;
  font-size: 15px;
}

.library-filter-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.library-filter-details summary {
  width: max-content;
  color: #245bc7;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.library-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  padding-top: 14px;
}

.library-filter-actions,
.library-form-actions,
.library-attachment-actions,
.library-case-state-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.library-section-note,
.library-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.library-result-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  padding-inline: 8px;
  background: #eef4ff;
  color: #245bc7;
}

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

.library-folder-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.library-folder-card:hover {
  border-color: #9bb9ef;
  box-shadow: 0 8px 22px rgba(31, 75, 153, 0.1);
  transform: translateY(-1px);
}

.library-folder-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #245bc7;
  background: #eef4ff;
  font-size: 16px;
  font-weight: 850;
}

.library-folder-icon.family {
  color: #7a2e0e;
  background: #fff4ed;
}

.library-folder-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-folder-copy strong,
.library-folder-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-folder-copy small,
.library-model-row small {
  color: var(--muted);
  font-size: 12px;
}

.library-folder-arrow {
  color: #98a2b3;
  font-size: 24px;
}

.library-empty-state {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 40px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}

.library-empty-state.compact {
  padding: 24px 16px;
}

.library-empty-state strong {
  color: var(--text);
}

.library-case-list,
.library-model-list {
  display: grid;
}

.library-case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.library-case-row:last-child,
.library-model-row:last-child {
  border-bottom: 0;
}

.library-case-row:hover strong,
.library-model-row:hover strong {
  color: #245bc7;
}

.library-case-main,
.library-case-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.library-case-main > span {
  display: -webkit-box;
  overflow: hidden;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.library-case-main small,
.library-case-meta small {
  color: var(--muted);
  font-size: 12px;
}

.library-case-meta {
  justify-items: end;
  text-align: right;
}

.library-status-confirmat_service {
  color: var(--green);
  background: #ecfdf3;
}

.library-status-neverificat {
  color: var(--amber);
  background: #fffaeb;
}

.library-status-arhivat {
  color: #475467;
  background: #eaecf0;
}

.library-status-caz_intern {
  color: #175cd3;
  background: #eff8ff;
}

.library-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.library-pagination > :last-child {
  justify-self: end;
}

.library-pagination > span {
  color: var(--muted);
  font-size: 13px;
}

.library-inline-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.library-inline-search input {
  flex: 1;
}

.library-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.library-model-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-model-row > span:last-child {
  justify-items: end;
}

.library-model-description p {
  margin: 0;
  white-space: pre-wrap;
}

.library-case-form {
  display: grid;
  gap: 18px;
}

.library-form-section {
  margin-bottom: 0;
}

.library-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
}

.library-form-heading > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #245bc7;
  background: #eef4ff;
  font-weight: 850;
}

.library-form-heading h2 {
  margin: 0 0 3px;
}

.library-form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.library-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.library-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.library-form-full {
  grid-column: 1 / -1;
}

.library-classification-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-upload-dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 130px;
  box-sizing: border-box;
  border: 2px dashed #b2c6e9;
  border-radius: 14px;
  padding: 20px;
  color: #245bc7;
  background: #f8fbff;
  text-align: center;
  cursor: pointer;
}

.library-upload-dropzone:hover {
  border-color: #6b9af5;
  background: #f1f6ff;
}

.library-upload-dropzone > span {
  font-weight: 800;
}

.library-upload-dropzone small {
  color: var(--muted);
  font-weight: 500;
}

.library-upload-dropzone input {
  width: min(100%, 420px);
  min-height: 44px;
  color: var(--text);
}

.library-upload-queue {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.library-upload-queue:empty {
  display: none;
}

.library-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.library-upload-item > span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-upload-item small {
  flex: 0 0 auto;
  color: var(--muted);
}

.library-upload-item.uploading {
  border-color: #84adff;
  background: #eff8ff;
}

.library-upload-item.complete {
  border-color: #abefc6;
  background: #ecfdf3;
}

.library-upload-item.error {
  border-color: #fecdca;
  background: #fef3f2;
}

.library-form-actions {
  justify-content: flex-end;
  padding-bottom: 8px;
}

.library-case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.library-case-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.library-case-overview > div,
.library-case-footer > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-case-overview strong,
.library-case-footer strong {
  overflow-wrap: anywhere;
}

.library-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.library-code-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe5f4;
  border-radius: 10px;
  background: #f8fafc;
}

.library-code-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.library-code-grid code {
  overflow-wrap: anywhere;
  color: #1d2939;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
}

.library-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.library-detail-section {
  min-width: 0;
}

.library-detail-section dl {
  grid-template-columns: 140px minmax(0, 1fr);
}

.library-detail-section dd {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.library-attachment-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.library-image-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.library-image-open {
  display: block;
  width: 100%;
  height: 190px;
  padding: 0;
  border: 0;
  background: #eef2f7;
  cursor: zoom-in;
}

.library-image-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-image-card > div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.library-image-card strong,
.library-pdf-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-image-card small,
.library-pdf-list small,
.library-case-footer small {
  color: var(--muted);
  font-size: 12px;
}

.library-image-card p,
.library-pdf-list p {
  margin: 4px 0;
  color: #475467;
  font-size: 13px;
}

.library-attachment-actions {
  margin-top: 5px;
}

.library-attachment-actions a,
.library-attachment-actions button:not(.button) {
  border: 0;
  padding: 0;
  color: #245bc7;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.library-attachment-actions button:not(.button) {
  color: var(--red);
}

.library-pdf-list {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.library-pdf-list > article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.library-pdf-list > article > div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-pdf-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #b42318;
  background: #fef3f2;
  font-size: 11px;
  font-weight: 850;
}

.library-attachment-upload {
  display: grid;
  gap: 13px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.library-attachment-upload > .button {
  justify-self: start;
}

.library-case-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 18px;
}

.library-image-viewer {
  width: min(96vw, 1180px);
  max-width: none;
  height: min(92vh, 900px);
  max-height: none;
  box-sizing: border-box;
  border: 0;
  border-radius: 16px;
  padding: 14px;
  color: #fff;
  background: #101828;
}

.library-image-viewer::backdrop {
  background: rgba(7, 12, 24, 0.86);
}

.library-viewer-toolbar,
.library-viewer-zoom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.library-viewer-toolbar {
  padding-bottom: 10px;
}

.library-viewer-toolbar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(100% - 98px);
  overflow: auto;
  border-radius: 10px;
  background: #080d1a;
}

.library-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  transition: transform 0.12s ease;
}

.library-viewer-navigation {
  position: sticky;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: #fff;
  background: rgba(16, 24, 40, 0.75);
  font-size: 30px;
  cursor: pointer;
}

.library-viewer-navigation.previous {
  position: absolute;
  left: 10px;
}

.library-viewer-navigation.next {
  position: absolute;
  right: 10px;
}

.library-viewer-zoom {
  justify-content: center;
  padding-top: 10px;
}

.library-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.library-admin-grid .panel {
  margin-bottom: 0;
}

.library-admin-list {
  display: grid;
}

.library-admin-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.library-admin-list > article:last-child {
  border-bottom: 0;
}

.library-admin-list > article:has(.library-admin-parent) {
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr) auto;
}

.library-admin-edit {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.library-admin-parent {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-admin-note p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .library-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-brand-grid,
  .library-attachment-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-code-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-library-header,
  .library-page-heading,
  .library-case-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-library-header .page-actions,
  .library-page-heading .page-actions,
  .library-case-heading .page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .metrics.library-metrics,
  .library-case-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-filter-grid,
  .library-classification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-detail-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .library-case-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-case-state-actions {
    grid-column: 1 / -1;
  }

  .library-pdf-list > article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .library-pdf-list .library-attachment-actions {
    grid-column: 1 / -1;
  }

  .library-admin-grid {
    grid-template-columns: 1fr;
  }

  .library-admin-list > article:has(.library-admin-parent) {
    grid-template-columns: minmax(90px, 0.3fr) minmax(0, 1fr);
  }

  .library-admin-list > article:has(.library-admin-parent) > form:last-child {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .dashboard-library-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-library-metrics > div {
    padding: 11px;
  }

  .dashboard-library-metrics strong {
    font-size: 19px;
  }

  .dashboard-library-header .page-actions,
  .library-page-heading .page-actions,
  .library-case-heading .page-actions,
  .library-form-actions {
    grid-template-columns: 1fr;
  }

  .library-page-heading .page-actions .button,
  .library-case-heading .page-actions .button,
  .library-form-actions .button {
    width: 100%;
  }

  .metrics.library-metrics,
  .library-filter-grid,
  .library-brand-grid,
  .library-form-grid,
  .library-classification-grid,
  .library-case-overview,
  .library-code-grid,
  .library-attachment-gallery,
  .library-case-footer {
    grid-template-columns: 1fr;
  }

  .library-form-full {
    grid-column: auto;
  }

  .library-case-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .library-case-meta {
    justify-items: start;
    text-align: left;
  }

  .library-inline-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .library-pagination > span {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }

  .library-pagination > :last-child {
    justify-self: stretch;
  }

  .library-pagination .button {
    width: 100%;
  }

  .library-detail-section dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .library-detail-section dd {
    margin-bottom: 12px;
  }

  .library-image-open {
    height: 220px;
  }

  .library-case-state-actions {
    grid-column: auto;
  }

  .library-case-state-actions,
  .library-case-state-actions form,
  .library-case-state-actions .button {
    width: 100%;
  }

  .library-admin-list > article,
  .library-admin-list > article:has(.library-admin-parent) {
    grid-template-columns: 1fr;
  }

  .library-admin-list > article:has(.library-admin-parent) > form:last-child {
    grid-column: auto;
  }

  .library-admin-edit {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-image-viewer {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    padding: 10px;
  }

  .library-viewer-stage {
    height: calc(100% - 94px);
  }

  .library-breadcrumb > span:last-child {
    max-width: 58vw;
  }
}

@media (max-width: 430px) {
  .library-search-panel,
  .library-form-section {
    padding: 14px;
  }

  .library-upload-dropzone {
    min-height: 118px;
    padding: 16px 10px;
  }

  .library-folder-card {
    padding: 13px;
  }

  .library-folder-icon {
    width: 38px;
    height: 38px;
  }

  .library-upload-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .library-pdf-list > article {
    grid-template-columns: 1fr;
  }

  .library-pdf-list .library-attachment-actions {
    grid-column: auto;
  }
}

/* MOZY RECEPTION STATUS TABS V1.7.1 */
.panel[data-reception-list] .reception-filter-scroll {
  position: relative;
  width: 100%;
  margin: 2px 0 20px;
  padding: 6px;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  background: #f3f6fb;
  box-shadow: inset 0 1px 2px rgba(18, 26, 51, 0.035);
}

.panel[data-reception-list] .reception-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
}

.panel[data-reception-list] .reception-filter-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #526078;
  background: transparent;
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.panel[data-reception-list] .reception-filter-tab:hover {
  border-color: #d7e3f5;
  color: #1849a9;
  background: #fff;
  box-shadow: 0 3px 10px rgba(31, 75, 153, 0.08);
  transform: translateY(-1px);
}

.panel[data-reception-list] .reception-filter-tab:focus-visible {
  border-color: #84adff;
  outline: 3px solid rgba(47, 111, 237, 0.2);
  outline-offset: 2px;
}

.panel[data-reception-list] .reception-filter-tab--active,
.panel[data-reception-list] .reception-filter-tab--active:hover {
  border-color: #2f6fed;
  color: #fff;
  background: linear-gradient(135deg, #2f6fed 0%, #245bc7 100%);
  box-shadow:
    0 5px 13px rgba(47, 111, 237, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: none;
}

.panel[data-reception-list] .reception-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #526078;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.panel[data-reception-list]
  .reception-filter-tab--active
  .reception-filter-count {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 720px) {
  .panel[data-reception-list] .reception-filter-scroll {
    overflow: hidden;
    margin-inline: 0;
    padding: 5px;
  }

  .panel[data-reception-list] .reception-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 5px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .panel[data-reception-list] .reception-filters::-webkit-scrollbar {
    display: none;
  }

  .panel[data-reception-list] .reception-filter-tab {
    min-height: 42px;
    padding-inline: 12px;
    scroll-snap-align: start;
  }
}

/* FIELD TECHNICIAN */
.field-list {
  display: grid;
  gap: 12px;
}

.field-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.field-card:hover {
  border-color: #9bb9ef;
  box-shadow: 0 8px 24px rgba(31, 75, 153, 0.1);
  transform: translateY(-1px);
}

.field-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-card span:not(.badge),
.field-card small {
  color: var(--muted);
}

.badge.field-asteapta_semnare {
  background: #fffaeb;
  color: var(--amber);
}

.badge.field-semnat,
.badge.field-finalizat {
  background: #ecfdf3;
  color: var(--green);
}

.badge.field-anulat {
  background: #fff1f0;
  color: var(--red);
}

.field-source-badge {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: #175cd3 !important;
  background: #eef4ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field-source-banner {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid #b2ccff;
  border-radius: 12px;
  color: #1849a9;
  background: #eef4ff;
}

.field-source-banner span {
  color: #344054;
  line-height: 1.45;
}

.field-form [hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .field-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .field-card .badge {
    justify-self: start;
  }
}

/* SETTINGS */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(440px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.settings-user-list {
  display: grid;
  gap: 12px;
}

.settings-user {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.settings-user-meta {
  display: grid;
  gap: 4px;
}

.settings-user-meta small {
  color: var(--muted);
}

.settings-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-user-actions form {
  margin: 0;
}

.settings-reset {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.settings-reset input {
  min-width: 190px;
  flex: 1;
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .settings-user {
    grid-template-columns: 1fr;
  }

  .settings-user-actions {
    justify-content: flex-start;
  }

  .settings-reset {
    display: grid;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--blue);
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4c83ff, #7aa8ff);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  font-size: 11px;
  color: #aebbd4;
  margin-top: 2px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  margin-top: 42px;
}

.sidebar nav a {
  color: #c8d2e6;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--navy2);
  color: #fff;
}

.logout {
  margin-top: auto;
  width: 100%;
  padding: 11px;
  border: 1px solid #354263;
  background: transparent;
  color: #c8d2e6;
  border-radius: 10px;
  cursor: pointer;
}

.content {
  min-width: 0;
  padding: 36px 42px 20px;
}

.mobile-header {
  display: none;
}

.mobile-menu-toggle,
.mobile-menu-backdrop {
  display: none;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading h1 {
  font-size: 30px;
  margin: 3px 0 0;
}

.eyebrow {
  font-size: 12px;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.date {
  color: var(--muted);
  font-size: 14px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(25, 42, 77, 0.04);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

.metrics .warning {
  border-color: #fed7aa;
  background: #fffaf5;
}

.two-columns {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(25, 42, 77, 0.035);
  margin-bottom: 20px;
}

.panel h2 {
  font-size: 17px;
  margin: 0 0 18px;
}

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

.panel-title h2 {
  margin: 0;
}

.panel-title a {
  font-size: 13px;
  font-weight: 700;
}

.empty {
  padding: 24px 8px;
  color: var(--muted);
  text-align: center;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.list-row:last-child {
  border: 0;
}

.list-row small,
td small,
.message-row small,
.conversation-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.time {
  font-weight: 800;
  color: var(--blue);
}

.message-row {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.message-row:last-child {
  border: 0;
}

.message-row p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #40485b;
}

.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526075;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.confirmata,
.badge.finalizata {
  background: #ecfdf3;
  color: var(--green);
}

.badge.in_asteptare,
.badge.noua,
.badge.asteapta_acord,
.badge.asteapta_piesa {
  background: #fffaeb;
  color: var(--amber);
}

.badge.anulata,
.badge.alert {
  background: #fef3f2;
  color: var(--red);
}

.badge.in_lucru {
  background: #eff8ff;
  color: #175cd3;
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.filters input {
  flex: 1;
}

.filters input,
.filters select,
.stack-form input,
.stack-form select {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  background: var(--blue);
  color: #fff;
}

.button.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:hover {
  background: #fafcff;
}

.conversation-list,
.conversation-list.single-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.conversation-card {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
}

.conversation-card.needs-reply {
  border-color: #fdb022;
}

.conversation-card p {
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.conversation-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.conversation-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-grid {
  grid-template-columns: repeat(2, 1fr);
}

dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 16px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  font-size: 14px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.stack-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.stack-form .checkbox-row input[type="checkbox"] {
  appearance: auto;
  min-height: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.stack-form .checkbox-row span {
  font-size: 14px;
  font-weight: 700;
}

.flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.flag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.flag.warranty {
  color: #175cd3;
  background: #eff8ff;
  border: 1px solid #b2ddff;
}

.flag.difficult {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding: 4px;
}

.bubble {
  max-width: 78%;
  padding: 11px 13px;
  border-radius: 14px;
  background: #eef2f7;
}

.bubble.outgoing {
  align-self: flex-end;
  background: #e7f8ed;
}

.bubble small {
  color: var(--muted);
  font-size: 10px;
}

.bubble p {
  margin: 5px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.save-toast {
  position: fixed;
  z-index: 1000;
  top: 22px;
  right: 22px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  color: #05603a;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.16);
  font-size: 14px;
  font-weight: 750;
}

footer {
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  padding: 28px 0 4px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, #253866, var(--navy) 55%);
}

.login-card {
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.login-brand {
  color: var(--text);
  margin-bottom: 30px;
}

.login-card h1 {
  margin: 0 0 6px;
}

.login-card > p {
  color: var(--muted);
  margin: 0 0 22px;
}

.alert.error {
  background: #fef3f2;
  color: var(--red);
  border-radius: 10px;
  padding: 11px;
  margin-bottom: 14px;
  font-size: 13px;
}

@media (max-width: 1000px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    height: 100dvh;
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    padding: max(22px, env(safe-area-inset-top)) 18px
      max(22px, env(safe-area-inset-bottom));
    background: var(--navy);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 14px 0 38px rgba(8, 15, 35, 0.32);
  }

  .mobile-menu-open {
    overflow: hidden;
  }

  .mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar > .brand {
    display: flex;
  }

  .sidebar form {
    display: block;
  }

  .sidebar nav {
    margin: 34px 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sidebar nav a {
    font-size: 15px;
    text-align: left;
    padding: 13px 14px;
  }

  .content {
    width: 100%;
    max-width: 100%;
    padding: 0 14px max(24px, env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .mobile-header {
    display: flex;
    position: sticky;
    z-index: 30;
    top: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: calc(100% + 28px);
    margin: 0 -14px 24px;
    padding: max(14px, env(safe-area-inset-top)) 18px 14px;
    color: #fff;
    background: var(--navy);
    box-shadow: 0 3px 12px rgba(8, 15, 35, 0.16);
  }

  .mobile-header .brand small {
    display: none;
  }

  .mobile-menu-toggle {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #354263;
    border-radius: 11px;
    background: var(--navy2);
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }

  .mobile-menu-backdrop {
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 15, 35, 0.52);
  }

  .mobile-menu-open .mobile-menu-backdrop {
    display: block;
  }

  .page-heading {
    align-items: flex-start;
  }

  .date {
    display: none;
  }

  .metrics {
    gap: 10px;
  }

  .metrics article {
    padding: 15px;
  }

  .metrics strong {
    font-size: 25px;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filters input {
    flex-basis: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 15px;
  }

  .table-wrap {
    padding: 0;
  }

  dl {
    grid-template-columns: 120px 1fr;
  }

  .bubble {
    max-width: 92%;
  }

  .conversation-header {
    flex-direction: column;
  }

  .conversation-flags {
    justify-content: flex-start;
  }

  .save-toast {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
.table-flags,
.status-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-flags {
  margin-top: 8px;
}
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}

.date-picker-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-picker-form input[type="date"] {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.appointment-row {
  grid-template-columns: 125px 1fr auto;
}

.appointment-time {
  font-size: 13px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .date-navigation {
    align-items: stretch;
  }

  .date-navigation > *,
  .date-picker-form {
    width: 100%;
  }

  .date-picker-form input[type="date"] {
    flex: 1;
    min-width: 0;
  }

  .date-navigation .button {
    flex: 1;
  }

  .appointment-row {
    grid-template-columns: 92px 1fr;
  }

  .appointment-row > .badge {
    grid-column: 2;
    width: fit-content;
  }
}
.full-width {
  grid-column: 1 / -1;
}

.edit-service-form {
  display: block;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.field > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field-wide {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(47, 111, 237, 0.2);
  border-color: var(--blue);
}

.checkbox-group {
  gap: 8px;
}

.checkbox-group .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.checkbox-group .checkbox-row input[type="checkbox"] {
  appearance: auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.checkbox-group .checkbox-row span {
  font-size: 14px;
  font-weight: 700;
}

.save-service-button {
  width: 100%;
  margin-top: 18px;
}

.error-toast {
  position: fixed;
  z-index: 1000;
  top: 22px;
  right: 22px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 14px 18px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.16);
  font-size: 14px;
  font-weight: 750;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .form-hint {
    display: none;
  }

  .error-toast {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
.page-actions{display:flex;justify-content:flex-end;gap:10px;margin:-10px 0 20px}
@media(max-width:720px){.page-actions .button{width:100%}}

/* RECEPTIE FORM LAYOUT */
.detail-form {
  display: block;
}

.detail-form [hidden] {
  display: none !important;
}

.detail-form .form-grid > label,
.detail-form .accessories-details,
.detail-form > label.full-width {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.detail-form .form-grid {
  align-items: start;
  column-gap: 20px;
  row-gap: 16px;
}

.detail-form .form-label-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-height: 18px;
  line-height: 1.35;
}

.detail-form .form-label-text [aria-hidden="true"] {
  color: #b42318;
}

.detail-form input:not([type="radio"]):not([type="checkbox"]),
.detail-form select,
.detail-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
}

.detail-form textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.45;
}

.detail-form input:not([type="radio"]):not([type="checkbox"]):focus,
.detail-form select:focus,
.detail-form textarea:focus {
  outline: 2px solid rgba(47, 111, 237, 0.2);
  border-color: var(--blue);
}

.detail-form .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.detail-form .radio-group legend {
  width: 100%;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.detail-form .radio-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.detail-form .radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.detail-form .accessories-details {
  margin-top: 16px;
}

.detail-form .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.detail-form .money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.detail-form .money-input input {
  border-radius: 10px 0 0 10px;
}

.detail-form .money-input > span {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #475467;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  font-weight: 700;
}

.detail-form .form-section-title {
  margin-top: 22px;
}

.field-form .panel {
  padding: 20px;
}

.field-form .page-actions,
.detail-form .form-actions {
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .detail-form .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-form .form-grid > .full-width {
    grid-column: auto;
  }

  .detail-form .radio-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-form .radio-group label {
    width: 100%;
    box-sizing: border-box;
  }

  .detail-form .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-form .form-actions .button {
    width: 100%;
  }

  .field-form .panel {
    padding: 16px;
  }

  .field-form .page-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .field-form .page-actions .button {
    width: 100%;
    min-height: 48px;
  }
}

/* RECEPTION LIST CARDS */
.reception-result-summary {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.reception-filter-scroll {
  min-width: 0;
  max-width: 100%;
  margin: 0 0 20px;
}

.reception-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.reception-filter-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #344054;
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.reception-filter-tab:hover {
  border-color: #84adff;
  color: #1849a9;
  background: #f7f9ff;
}

.reception-filter-tab:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(47, 111, 237, 0.2);
  outline-offset: 2px;
}

.reception-filter-tab--active {
  border-color: #84adff;
  color: #1849a9;
  background: #eef4ff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.reception-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  min-height: 25px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #475467;
  background: #f2f4f7;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.reception-filter-tab--active .reception-filter-count {
  color: #fff;
  background: var(--blue);
}

.reception-search {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

.reception-search > label {
  font-weight: 700;
}

.reception-search-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.reception-search-controls input {
  flex: 1 1 360px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.reception-search-controls input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(47, 111, 237, 0.16);
}

.reception-search > small {
  color: var(--muted);
}

.reception-list {
  display: grid;
  gap: 12px;
}

.reception-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.reception-row:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.reception-row:focus-within {
  outline: 3px solid rgba(47, 111, 237, 0.24);
  outline-offset: 2px;
}

.reception-row-main {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.reception-row-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.reception-row-content strong,
.reception-row-content small {
  overflow-wrap: anywhere;
}

.reception-row-content strong {
  font-size: 15px;
}

.reception-row-content small {
  color: var(--muted);
  line-height: 1.4;
}

.reception-row-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.reception-row-side > .badge {
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.reception-pdf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button.compact {
  padding: 7px 10px;
  font-size: 0.85rem;
}

.reception-empty-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafc;
}

.reception-empty-state strong {
  flex: 1 1 100%;
  color: var(--text);
}

.reception-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.reception-pagination > span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .reception-filter-scroll {
    width: 100%;
    overflow: hidden;
  }

  .reception-filters {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 2px 8px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .reception-filters::-webkit-scrollbar {
    display: none;
  }

  .reception-filter-tab {
    flex: 0 0 auto;
    min-height: 44px;
    scroll-snap-align: center;
    white-space: nowrap;
  }

  .reception-search-controls {
    flex-direction: column;
  }

  .reception-search-controls input,
  .reception-search-controls .button {
    width: 100%;
  }

  .reception-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .reception-row-side {
    justify-items: start;
  }

  .reception-pdf-actions {
    justify-content: flex-start;
  }

  .reception-empty-state {
    align-items: stretch;
  }

  .reception-empty-state .button {
    width: 100%;
  }

  .reception-pagination {
    justify-content: space-between;
  }

  .reception-pagination > span {
    order: -1;
    width: 100%;
    text-align: center;
  }
}

/* RECEPTION DETAIL ACTIONS */
.reception-document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin: 8px 0 18px;
}

.reception-command-center {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}

.reception-command-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reception-command-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.reception-command-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.reception-action-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.reception-action-menus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.reception-action-toolbar form,
.action-dropdown form {
  margin: 0;
}

.reception-back-button {
  margin-right: auto;
  gap: 7px;
}

.action-dropdown {
  position: relative;
}

.action-dropdown > summary {
  list-style: none;
}

.action-dropdown > summary::-webkit-details-marker {
  display: none;
}

.action-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-color: #c9d5e5;
  background: #fff;
  color: #172033;
  user-select: none;
}

.action-dropdown-trigger:hover,
.action-dropdown[open] > .action-dropdown-trigger {
  border-color: #84adff;
  background: #f2f6ff;
  color: #1849a9;
}

.action-dropdown-trigger:focus-visible {
  outline: 3px solid rgba(21, 112, 239, 0.24);
  outline-offset: 2px;
}

.action-dropdown-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 1px 2px 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.action-dropdown[open] .action-dropdown-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.action-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  box-sizing: border-box;
  width: max-content;
  min-width: 238px;
  max-width: min(330px, calc(100vw - 32px));
  overflow: hidden;
  padding: 7px;
  border: 1px solid #d6dfeb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.16);
}

.action-dropdown-end .action-dropdown-menu {
  right: 0;
  left: auto;
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #25324a;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-dropdown-item:hover,
.action-dropdown-item:focus-visible {
  background: #f2f6ff;
  color: #1849a9;
  outline: none;
}

.action-dropdown-divider {
  height: 1px;
  margin: 6px 5px;
  background: #e7ecf3;
}

.action-dropdown-danger {
  color: #b42318;
}

.action-dropdown-danger:hover,
.action-dropdown-danger:focus-visible {
  background: #fff0ef;
  color: #912018;
}

.action-dropdown-danger:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.reception-status-form {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f7faff;
}

.reception-status-field {
  display: grid;
  gap: 7px;
}

.reception-status-field > span {
  font-weight: 700;
}

.reception-status-submit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.reception-notify-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 4px;
  font-size: 0.92rem;
  cursor: pointer;
}

.reception-notify-option input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.reception-status-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.button.danger:hover {
  background: #912018;
  border-color: #912018;
}

.button.danger:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.reception-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.reception-message.success {
  border: 1px solid #86c69a;
  background: #edf9f0;
  color: #176b35;
}

.reception-message.error {
  border: 1px solid #e3a29c;
  background: #fff0ef;
  color: #912018;
}

.signed-delete-note {
  margin: 10px 0 18px;
  color: #667085;
  font-size: 0.92rem;
}

/* RECEPTION PHOTOS */
.reception-photos {
  margin-top: 18px;
}

.reception-photos-heading {
  align-items: flex-start;
  gap: 16px;
}

.reception-photos-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.reception-photo-picker {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
}

.reception-photo-picker-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.reception-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reception-photo-progress {
  min-height: 22px;
  margin: 8px 0 12px;
  color: var(--green);
  font-weight: 700;
}

.reception-photo-progress:empty {
  display: none;
}

.reception-photo-progress.error {
  color: var(--red);
}

.reception-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.reception-photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.reception-photo-card > a {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f7;
}

.reception-photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reception-photo-meta {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.reception-photo-meta strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.reception-photo-meta small {
  color: var(--muted);
}

.reception-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}

.reception-photo-actions form {
  margin: 0;
}

@media (max-width: 700px) {
  .reception-document-actions,
  .reception-status-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reception-command-center {
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
  }

  .reception-command-heading p {
    font-size: 0.84rem;
  }

  .reception-document-actions > *,
  .reception-status-submit,
  .reception-status-form select,
  .reception-document-actions .button,
  .reception-status-submit .button {
    width: 100%;
  }

  .reception-action-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reception-back-button {
    width: 100%;
    margin: 0;
  }

  .reception-action-menus {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .action-dropdown-trigger {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 10px 7px;
    gap: 5px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .action-dropdown-chevron {
    width: 6px;
    height: 6px;
    margin-left: 1px;
  }

  .action-dropdown-menu,
  .action-dropdown-end .action-dropdown-menu {
    position: fixed;
    z-index: 90;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 9px;
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(16, 24, 40, 0.28);
  }

  .action-dropdown-item {
    min-height: 50px;
    font-size: 0.96rem;
  }

  .reception-status-submit {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reception-notify-option {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    background: #fff;
  }

  .reception-command-center .button {
    min-height: 48px;
    white-space: normal;
    text-align: center;
  }

  .reception-photos-heading {
    display: grid;
  }

  .reception-photo-picker {
    width: 100%;
    text-align: center;
  }

  .reception-photo-picker-group {
    display: grid;
    width: 100%;
  }

  .reception-photo-grid {
    grid-template-columns: 1fr;
  }
}

/* FIELD OPERATION DETAIL ACTIONS */
.field-command-center {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}

.field-command-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.field-command-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-action-section {
  display: grid;
  gap: 8px;
}

.field-action-section + .field-action-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.field-action-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-action-grid {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
}

.field-action-grid form {
  display: flex;
  margin: 0;
}

.field-action-grid .button {
  box-sizing: border-box;
  min-width: 180px;
  min-height: 48px;
  white-space: normal;
  text-align: center;
}

.field-action-grid form .button {
  width: 100%;
}

.field-navigation-actions {
  align-items: center;
}

.field-navigation-actions .field-back-button {
  margin-right: auto;
  gap: 7px;
}

.field-admin-actions {
  justify-content: end;
}

.field-admin-section {
  border-top-color: #f4c7c3 !important;
}

@media (max-width: 700px) {
  .field-command-center {
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
  }

  .field-command-heading p {
    font-size: 0.84rem;
  }

  .field-action-grid,
  .field-navigation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-action-grid > *,
  .field-action-grid form,
  .field-action-grid .button,
  .field-navigation-actions .field-back-button {
    width: 100%;
    margin-right: 0;
    justify-self: stretch;
  }
}

.test-mode-box {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 2px solid #f79009;
  border-radius: 14px;
  background: #fff7ed;
}

.test-mode-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.test-mode-choice input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.test-mode-choice span {
  display: grid;
  gap: 4px;
}

.test-mode-choice small {
  color: #7a2e0e;
  line-height: 1.45;
}

.test-mode-badge {
  display: inline-flex;
  width: fit-content;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f04438;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}

.test-mode-banner {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 2px solid #f04438;
  border-radius: 14px;
  background: #fff1f0;
  color: #912018;
}

.test-mode-banner strong {
  letter-spacing: .03em;
}

.reception-handover-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #b8c7d9;
  border-left: 5px solid #175cd3;
  border-radius: 12px;
  background: #f7faff;
}

.reception-handover-copy {
  display: grid;
  gap: 5px;
}

.reception-handover-copy strong {
  color: #163a63;
  font-size: 1rem;
}

.reception-handover-copy span {
  color: #526173;
  font-size: .88rem;
  line-height: 1.45;
}

.reception-handover-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reception-handover-buttons .button {
  box-sizing: border-box;
  min-height: 48px;
  white-space: normal;
  text-align: center;
}

@media (max-width: 820px) {
  .reception-handover-actions {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px;
  }

  .reception-handover-buttons {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .reception-handover-buttons .button {
    width: 100%;
  }
}
.signed-document-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.signed-document-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.signed-document-row strong,
.signed-document-row small {
  display: block;
}

.signed-document-row small {
  color: #667085;
  margin-top: 4px;
}

@media (max-width: 680px) {
  .signed-document-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* TECHNICIAN SCHEDULE V1.8.0 */
.technician-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
}

.technician-tabs a {
  flex: 1;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  color: #344054;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.technician-tabs a.active {
  color: #fff;
  background: var(--navy);
}

.daily-schedule-heading {
  align-items: center;
}

.daily-schedule-heading-actions,
.technician-day-navigation,
.appointment-contact-actions,
.appointment-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.schedule-send-button {
  color: #fff;
  background: #087443;
  box-shadow: 0 6px 14px rgba(8, 116, 67, .18);
}

.schedule-send-button:hover {
  background: #066339;
}

.technician-calendar-panel,
.technician-day-panel {
  margin-bottom: 18px;
}

.technician-calendar-heading,
.technician-day-heading,
.appointment-header,
.appointment-header-main,
.appointment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.technician-calendar-heading h2,
.technician-day-heading h2 {
  margin: 0;
}

.technician-day-heading {
  align-items: flex-end;
}

.technician-day-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.technician-calendar-weekdays {
  margin: 18px 0 7px;
  color: #667085;
  font-size: .78rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 7px 4px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: #25324a;
  background: #fff;
  text-decoration: none;
}

.calendar-day span {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 999px;
  color: #175cd3;
  background: #e8f1ff;
  font-size: .72rem;
  font-weight: 800;
}

.calendar-day.today {
  border-color: #84adff;
}

.calendar-day.selected {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.calendar-day.selected span {
  color: var(--navy);
  background: #fff;
}

.calendar-day.empty-day {
  border-color: transparent;
  background: transparent;
}

.daily-schedule-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.technician-type-filter {
  display: grid;
  grid-template-columns: auto minmax(180px, 300px) auto;
  align-items: end;
  justify-content: start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  background: #f8fafc;
}

.technician-type-filter label,
.appointment-result-form label,
.appointment-postpone label,
.technician-appointment-form label {
  font-weight: 700;
}

.technician-type-filter select,
.technician-appointment-form input:not([type="checkbox"]),
.technician-appointment-form select,
.technician-appointment-form textarea,
.appointment-result-form textarea,
.appointment-postpone input:not([type="checkbox"]),
.appointment-postpone textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.technician-type-filter select:focus-visible,
.technician-appointment-form input:focus-visible,
.technician-appointment-form select:focus-visible,
.technician-appointment-form textarea:focus-visible,
.appointment-result-form textarea:focus-visible,
.appointment-postpone input:focus-visible,
.appointment-postpone textarea:focus-visible,
.send-schedule-dialog button:focus-visible,
.send-schedule-dialog input:focus-visible,
.appointment-more summary:focus-visible {
  outline: 3px solid rgba(47, 111, 237, .22);
  outline-offset: 2px;
}

.appointment-empty-state {
  display: grid;
  gap: 5px;
  padding: 28px;
  border: 1px dashed #b9c6d8;
  border-radius: 13px;
  color: #475467;
  background: #f8fafc;
  text-align: center;
}

.technician-appointment-list,
.technician-appointment-form,
.appointment-result-form {
  display: grid;
  gap: 14px;
}

.appointment-card {
  min-width: 0;
}

.technician-appointment-card {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #dbe3ef;
  border-left: 4px solid #2f6fed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(28, 53, 91, .045);
}

.appointment-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f5;
}

.appointment-header-main {
  justify-content: flex-start;
}

.appointment-time {
  color: var(--navy);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.travel-type,
.appointment-status,
.appointment-technician,
.send-operation-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}

.appointment-technician {
  color: #1849a9;
  background: #eef4ff;
}

.travel-reparatie {
  color: #175cd3;
  background: #e8f1ff;
}

.travel-ridicare,
.status-nu_a_raspuns,
.status-amanat {
  color: #8a4b08;
  background: #fff3d6;
}

.travel-livrare,
.status-reparat {
  color: #087443;
  background: #e8f8ef;
}

.appointment-status {
  color: #475467;
  background: #f2f4f7;
}

.status-nu_s_a_putut_repara {
  color: #b42318;
  background: #fee4e2;
}

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

.appointment-section {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e7ecf3;
  border-radius: 10px;
  background: #f9fbfd;
}

.appointment-section small,
.appointment-existing-notes small {
  color: #667085;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.appointment-section span,
.appointment-section a,
.appointment-existing-notes p {
  overflow-wrap: anywhere;
  line-height: 1.42;
}

.appointment-section a {
  color: #175cd3;
  font-weight: 700;
}

.appointment-price-list {
  display: grid;
  gap: 4px;
  margin: 0 0 2px;
  padding: 0;
  list-style: none;
}

.appointment-price-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: .9rem;
}

.appointment-existing-notes {
  padding: 10px 12px;
  border-left: 3px solid #98a2b3;
  border-radius: 7px;
  background: #f9fafb;
}

.appointment-existing-notes p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.appointment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.appointment-action-label {
  margin-right: 3px;
  color: #667085;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.appointment-contact-actions .button,
.appointment-result-actions .button {
  min-height: 42px;
}

.appointment-result-form {
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  align-items: end;
  padding-top: 11px;
  border-top: 1px solid #eaecf0;
}

.appointment-result-form > label {
  display: grid;
  gap: 6px;
}

.appointment-result-actions {
  align-items: center;
}

.appointment-more {
  border-top: 1px solid #edf0f4;
}

.appointment-more > summary,
.schedule-send-history > details > summary {
  min-height: 44px;
  padding: 10px 2px 0;
  color: #344054;
  cursor: pointer;
  font-weight: 800;
}

.appointment-more-content {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}

.appointment-postpone {
  flex: 1 1 520px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fcfcfd;
}

.appointment-postpone > summary {
  min-height: 24px;
  cursor: pointer;
  font-weight: 800;
}

.appointment-postpone form {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(270px, 1.2fr);
  gap: 10px;
  margin-top: 12px;
}

.appointment-postpone label,
.technician-appointment-form label {
  display: grid;
  gap: 6px;
}

.appointment-time-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.appointment-time-fields-disabled {
  opacity: .55;
}

.appointment-postpone .postpone-notes,
.appointment-postpone .button {
  grid-column: 1 / -1;
}

.appointment-delete-form {
  flex: 0 0 auto;
  padding: 6px;
  border: 1px solid #f5c0bb;
  border-radius: 11px;
  background: #fff7f6;
}

.button.success {
  color: #fff;
  background: #087443;
}

.technician-form-panel {
  padding: 20px;
}

.technician-appointment-form {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}


/* Secțiunile comerciale incompatibile cu tipul deplasării nu ocupă spațiu. */
.appointment-form-section[hidden] {
  display: none !important;
}

.appointment-form-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 17px;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: #fbfcfe;
}

.appointment-form-section legend {
  padding: 0 8px;
  color: #17233d;
  font-size: 1rem;
  font-weight: 800;
}

.appointment-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.appointment-form-full {
  grid-column: 1 / -1;
}

.appointment-form-help {
  margin: -4px 0 0;
  color: #667085;
  font-size: .86rem;
}

.appointment-price-editor,
.appointment-price-rows {
  display: grid;
  gap: 10px;
}

.appointment-price-editor > .button {
  justify-self: start;
}

.appointment-price-row {
  display: grid;
  grid-template-columns: minmax(130px, .45fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 11px;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  background: #fff;
}

.price-remove-button {
  min-width: 92px;
}

.price-remove-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.appointment-commercial-grid {
  margin-top: 4px;
}

.appointment-no-interval,
.send-filter-option,
.send-recipient-option,
.send-appointment-option,
.send-technician-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.appointment-no-interval {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b8c8df;
  border-radius: 10px;
  background: #f3f7fd;
}

.appointment-no-interval.compact {
  align-self: end;
}

.appointment-no-interval input,
.send-filter-option input,
.send-recipient-option input,
.send-appointment-option input,
.send-technician-toggle input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #2f6fed;
}

.appointment-no-interval span {
  display: grid;
  gap: 2px;
}

.appointment-no-interval small {
  color: #667085;
  font-weight: 400;
}

.appointment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.schedule-send-history {
  margin-bottom: 18px;
}

.schedule-send-history > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px;
}

.schedule-send-history > details > summary span {
  color: #667085;
  font-size: .8rem;
  font-weight: 600;
}

.send-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.send-history-operation {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e0e6ef;
  border-radius: 11px;
  background: #fafbfc;
}

.send-history-operation > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.send-history-operation > header div {
  display: grid;
  gap: 3px;
}

.send-history-operation > header span:not(.send-operation-status) {
  color: #667085;
  font-size: .82rem;
}

.send-trimis {
  color: #067647;
  background: #e8f8ef;
}

.send-partial,
.send-in_curs {
  color: #8a4b08;
  background: #fff3d6;
}

.send-esuat {
  color: #b42318;
  background: #fee4e2;
}

.send-result-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.send-result-list li {
  padding: 9px 10px;
  border-left: 3px solid #98a2b3;
  border-radius: 7px;
  background: #fff;
}

.send-result-list li > div {
  display: grid;
  gap: 2px;
}

.send-result-list span,
.send-result-list small {
  color: #667085;
  overflow-wrap: anywhere;
}

.send-result-trimis {
  border-left-color: #12b76a;
}

.send-result-esuat {
  border-left-color: #d92d20;
}

.send-schedule-modal[hidden] {
  display: none;
}

.send-schedule-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.send-schedule-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(18, 26, 51, .68);
  cursor: default;
}

.send-schedule-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(920px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid #d7e0ec;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .34);
}

.send-schedule-dialog > header,
.send-schedule-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-color: #e7ebf1;
}

.send-schedule-dialog > header {
  border-bottom: 1px solid #e7ebf1;
}

.send-schedule-dialog > header h2 {
  margin: 2px 0 0;
}

.send-schedule-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #e7ebf1;
  background: #fafbfc;
}

.modal-close-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  color: #344054;
  background: #fff;
  cursor: pointer;
  font-size: 1.5rem;
}

.send-schedule-content {
  display: grid;
  gap: 15px;
  overflow-y: auto;
  padding: 17px 18px;
  overscroll-behavior: contain;
}

.send-summary-grid {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dce6f4;
  border-radius: 11px;
  background: #f6f9fe;
}

.send-summary-grid dt {
  color: #667085;
  font-weight: 700;
}

.send-summary-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.send-recipient-selector,
.send-appointment-selector,
.send-preview-section,
.send-result-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
}

.send-recipient-selector[hidden],
.send-result-panel[hidden],
.send-schedule-error[hidden] {
  display: none;
}

.send-recipient-selector h3,
.send-recipient-selector p,
.send-appointment-selector h3,
.send-appointment-selector p,
.send-preview-section h3,
.send-result-panel h3 {
  margin: 0;
}

.send-recipient-selector p,
.send-appointment-selector p {
  color: #667085;
  font-size: .84rem;
}

[data-recipient-options] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.send-recipient-option {
  padding: 10px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  background: #fbfcfd;
}

.send-recipient-option span,
.send-appointment-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.send-recipient-option small,
.send-appointment-option small {
  color: #667085;
  overflow-wrap: anywhere;
}

.send-selector-heading,
.send-preview-section > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.send-filter-option {
  flex: 0 1 360px;
  padding: 9px 10px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  font-size: .84rem;
  background: #fbfcfd;
}

.send-appointment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.send-technician-group {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #fbfcfd;
}

.send-technician-toggle {
  padding-bottom: 7px;
  border-bottom: 1px solid #e8ecf2;
}

.send-appointment-option {
  padding: 7px;
  border-radius: 7px;
}

.send-appointment-option:hover {
  background: #eef4ff;
}

.send-preview-section pre {
  max-height: 300px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border-radius: 9px;
  color: #e5e7eb;
  background: #111827;
  font: 500 .83rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.send-schedule-error {
  padding: 11px 12px;
  border: 1px solid #f0b7b2;
  border-radius: 9px;
  color: #912018;
  background: #fff4f3;
}

.schedule-modal-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .appointment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-commercial {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .daily-schedule-heading,
  .technician-day-heading,
  .appointment-header,
  .send-selector-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-schedule-heading-actions,
  .technician-day-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-schedule-heading-actions .button {
    width: 100%;
  }

  .technician-tabs {
    position: sticky;
    z-index: 5;
    top: 72px;
  }

  .technician-calendar-grid,
  .technician-calendar-weekdays {
    gap: 4px;
  }

  .calendar-day {
    min-height: 52px;
  }

  .technician-type-filter {
    grid-template-columns: 1fr auto;
  }

  .technician-type-filter label {
    grid-column: 1 / -1;
  }

  .appointment-grid,
  .appointment-result-form,
  .appointment-form-grid {
    grid-template-columns: 1fr;
  }

  .appointment-commercial,
  .appointment-form-full {
    grid-column: auto;
  }

  .appointment-result-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .appointment-result-actions .appointment-action-label {
    grid-column: 1 / -1;
  }

  .appointment-postpone form {
    grid-template-columns: 1fr;
  }

  .appointment-postpone .postpone-notes,
  .appointment-postpone .button {
    grid-column: auto;
  }

  .appointment-price-row {
    grid-template-columns: minmax(120px, .45fr) minmax(180px, 1fr);
  }

  .appointment-price-row .price-remove-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  [data-recipient-options],
  .send-appointment-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .technician-calendar-panel {
    padding: 13px;
  }

  .daily-schedule-heading-actions,
  .technician-day-navigation,
  .appointment-result-actions,
  .appointment-contact-actions {
    grid-template-columns: 1fr;
  }

  .technician-type-filter {
    grid-template-columns: 1fr;
  }

  .technician-type-filter label {
    grid-column: auto;
  }

  .technician-type-filter .button,
  .appointment-contact-actions .button,
  .appointment-result-actions .button {
    width: 100%;
  }

  .technician-appointment-card {
    gap: 11px;
    padding: 13px;
  }

  .appointment-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .appointment-action-label {
    width: 100%;
  }

  .appointment-price-row,
  .appointment-time-fields {
    grid-template-columns: 1fr;
  }

  .appointment-price-row .price-remove-button {
    grid-column: auto;
    width: 100%;
  }

  .appointment-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .technician-form-panel,
  .appointment-form-section {
    padding: 13px;
  }

  .send-schedule-modal {
    padding: 0;
  }

  .send-schedule-dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .send-schedule-dialog > header,
  .send-schedule-dialog > footer,
  .send-schedule-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .send-schedule-dialog > footer .button {
    flex: 1;
  }

  .send-summary-grid {
    grid-template-columns: 1fr;
  }

  .send-summary-grid dd {
    margin-bottom: 5px;
  }

  .send-selector-heading,
  .send-preview-section > div {
    flex-direction: column;
  }

  .send-filter-option {
    flex-basis: auto;
  }

  .send-history-operation > header,
  .schedule-send-history > details > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .technician-tabs a {
    padding-right: 10px;
    padding-left: 10px;
  }

  .calendar-day {
    min-height: 48px;
    font-size: .86rem;
  }

  .calendar-day span {
    min-width: 20px;
    height: 20px;
  }

  .appointment-section {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-day,
  .schedule-send-button,
  .send-schedule-dialog {
    scroll-behavior: auto;
    transition: none;
  }
}

/* BACKUP AND UPDATES */
.settings-maintenance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.maintenance-card { display: grid; align-content: start; gap: 16px; }
.maintenance-card h2, .maintenance-card p { margin-top: 0; }
.backup-list { display: grid; gap: 10px; }

.backup-list[hidden] {
  display: none !important;
}
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.backup-row > div { display: grid; gap: 4px; min-width: 0; }
.backup-row strong, .backup-row code { overflow-wrap: anywhere; }
.backup-row small, .backup-row code, .maintenance-warning {
  color: var(--muted);
  font-size: .78rem;
}
.update-file-field { display: grid; gap: 7px; font-weight: 700; }
.update-file-field input {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.maintenance-job-status {
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef4ff;
  color: #1849a9;
  font-weight: 700;
}
.maintenance-job-status.completed { background: #ecfdf3; color: #067647; }
.maintenance-job-status.failed { background: #fff1f0; color: #b42318; }

@media (max-width: 820px) {
  .settings-maintenance, .appointment-details { grid-template-columns: 1fr; }
  .backup-row, .technician-day-heading,
  .technician-appointment-card > header, .technician-type-filter {
    align-items: stretch;
    flex-direction: column;
  }
  .backup-row .button, .technician-day-navigation .button,
  .appointment-contact-actions .button, .appointment-result-actions .button,
  .technician-type-filter select, .technician-type-filter .button { width: 100%; }
  .technician-day-navigation, .appointment-contact-actions,
  .appointment-result-actions { display: grid; grid-template-columns: 1fr; }
  .technician-tabs { position: sticky; top: 72px; z-index: 5; }
  .technician-calendar-grid, .technician-calendar-weekdays { gap: 4px; }
  .calendar-day { min-height: 52px; }
  .appointment-postpone form { grid-template-columns: 1fr; }
  .appointment-postpone .postpone-notes, .appointment-postpone .button {
    grid-column: auto;
  }
}
.full-width-input {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
}

.signing-link-actions {
  margin-top: 18px;
}


/* Fișă tehnică internă — layout dedicat */
#fisa-tehnica-interna {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #c7d7fe;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 180px);
  box-shadow: 0 10px 24px rgba(31, 70, 140, .07);
}

#fisa-tehnica-interna > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 19px 22px 4px;
  color: #123b83;
  font-size: 1.18rem;
}

#fisa-tehnica-interna > h2::before {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #175cd3;
  background: #e7efff;
  content: "⚙";
  font-size: 17px;
}

#fisa-tehnica-interna > .muted {
  margin: 0;
  padding: 0 22px 19px 62px;
  color: #52637a;
  font-size: .88rem;
}

#technical-sheet-form {
  padding: 20px 22px 22px;
  border-top: 1px solid #dbe7ff;
  background: rgba(255, 255, 255, .78);
}

#technical-sheet-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 20px;
  align-items: start;
}

#technical-sheet-form .form-grid > label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #26364d;
  font-size: .86rem;
  font-weight: 750;
}

#technical-sheet-form .form-grid > label:nth-child(-n + 4) {
  padding: 14px;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  background: #fbfcfe;
}

#technical-sheet-form input,
#technical-sheet-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #bfcce0;
  border-radius: 9px;
  color: #172b4d;
  background: #fff;
  font: inherit;
  font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#technical-sheet-form input {
  min-height: 44px;
  padding: 9px 11px;
}

#technical-sheet-form textarea {
  min-height: 92px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

#technical-sheet-form input:focus,
#technical-sheet-form textarea:focus {
  outline: 0;
  border-color: #3777e8;
  box-shadow: 0 0 0 3px rgba(55, 119, 232, .16);
}

#technical-sheet-form .form-grid > div:last-child {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 17px;
  border: 1px solid #a8dfc0;
  border-radius: 12px;
  color: #086a3e;
  background: linear-gradient(135deg, #effcf4, #e1f8eb);
}

#technical-sheet-form .form-grid > div:last-child strong {
  display: grid;
  gap: 2px;
  font-size: .8rem;
  letter-spacing: .01em;
  text-transform: uppercase;
}

#tech-profit {
  color: #075e36;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-transform: none;
}

#technical-sheet-form > .button {
  min-width: 210px;
  margin-top: 22px;
  border-radius: 10px;
  box-shadow: 0 5px 12px rgba(23, 92, 211, .22);
}

#technical-history {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 22px 22px;
  border-top: 1px solid #e8edf5;
  background: #f8fafc;
}

#technical-history:empty { display: none; }
#technical-history h3 { margin: 0 0 2px; color: #34445b; font-size: .96rem; }
#technical-history article {
  padding: 12px 14px;
  border-left: 4px solid #5b8def;
  border-radius: 8px;
  color: #34445b;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
#technical-history article small { color: #667085; line-height: 1.55; }

@media (max-width: 720px) {
  #fisa-tehnica-interna { border-radius: 14px; }
  #fisa-tehnica-interna > h2 { padding: 16px 16px 4px; font-size: 1.08rem; }
  #fisa-tehnica-interna > .muted { padding: 0 16px 16px; }
  #technical-sheet-form { padding: 16px; }
  #technical-sheet-form .form-grid { grid-template-columns: 1fr; gap: 14px; }
  #technical-sheet-form .form-grid > label:nth-child(-n + 4) { padding: 12px; }
  #technical-sheet-form > .button { width: 100%; margin-top: 18px; }
  #technical-history { padding: 16px; }
}
/* MOZY SERVICE DOCUMENTS */
.service-document-form {
  display: grid;
  gap: 18px;
}

.document-form-card {
  border-top: 4px solid #2f6fed;
}

.document-form-card h2 {
  margin-bottom: 18px;
}

.document-submit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #b8c9e8;
  background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
}

.document-whatsapp-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}

.document-whatsapp-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.document-whatsapp-option span {
  display: grid;
  gap: 4px;
}

.document-whatsapp-option small {
  color: #68758d;
  font-weight: 400;
}

.document-history {
  margin-top: 22px;
}

.document-history .certificate-row {
  border-left: 4px solid #2f6fed;
}

@media (max-width: 760px) {
  .document-submit-card {
    align-items: stretch;
    flex-direction: column;
  }

  .document-submit-card .button {
    width: 100%;
  }
}
.signature-card .muted {
  color: #68758d;
  margin-top: -.3rem;
}
.document-signature-box {
  max-width: 760px;
  overflow: hidden;
  border: 2px solid #ccd6e5;
  border-radius: 12px;
  background: #fff;
  margin: 1rem 0;
}
#document-signature-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

/* MOZY SERVICE DOCUMENT DESIGN V1.2.0 */
.service-document-form {
  --doc-accent: #2f6fed;
  --doc-accent-soft: #eef4ff;
  --doc-border: #d8e1ee;
  --doc-label: #34445b;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  gap: 22px;
}

.service-document-form .document-form-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 26px 28px 30px;
  border: 1px solid var(--doc-border);
  border-top: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(25, 42, 77, .06);
}

.service-document-form .document-form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2f6fed, #76a1ff);
}

.service-document-form .document-form-card > h2 {
  display: flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 22px;
  color: #17233d;
  font-size: 17px;
  line-height: 1.3;
}

.service-document-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 28px;
  row-gap: 20px;
}

.service-document-form .form-grid > label {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--doc-label);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.service-document-form .form-grid > label.full {
  grid-column: 1 / -1;
}

.service-document-form input:not([type="checkbox"]),
.service-document-form select,
.service-document-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  color: #17233d;
  background: #fbfcfe;
  border: 1px solid #c8d3e2;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .025);
  font: inherit;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.service-document-form textarea {
  min-height: 96px;
  resize: vertical;
}

.service-document-form input:not([type="checkbox"]):hover,
.service-document-form select:hover,
.service-document-form textarea:hover {
  border-color: #aebdd2;
  background: #fff;
}

.service-document-form input:not([type="checkbox"]):focus,
.service-document-form select:focus,
.service-document-form textarea:focus {
  outline: none;
  border-color: var(--doc-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .14);
}

.service-document-form input::placeholder,
.service-document-form textarea::placeholder {
  color: #8b98ac;
  opacity: 1;
}

.service-document-form .signature-card {
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

.service-document-form .signature-card .muted {
  margin: -10px 0 16px;
  line-height: 1.55;
}

.service-document-form .document-signature-box {
  width: 100%;
  max-width: 760px;
  margin: 0 0 14px;
  border: 1px dashed #9fb2ce;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #f8fbff, #eef4ff) border-box;
  box-shadow: inset 0 1px 5px rgba(25, 42, 77, .04);
}

.service-document-form + .document-history,
.service-document-form .document-submit-card {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.service-document-form .document-submit-card {
  margin-bottom: 0;
  padding: 22px 26px;
  border: 1px solid #bfd0ec;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(47, 111, 237, .07);
}

.service-document-form .document-whatsapp-option {
  padding: 4px 0;
}

.service-document-form .document-whatsapp-option input[type="checkbox"] {
  flex: 0 0 auto;
  accent-color: var(--doc-accent);
}

.service-document-form .document-submit-card > .button.primary {
  min-width: 220px;
  min-height: 46px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(47, 111, 237, .22);
}

@media (max-width: 820px) {
  .service-document-form {
    gap: 16px;
  }

  .service-document-form .document-form-card {
    padding: 22px 20px 24px;
  }

  .service-document-form .form-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .service-document-form .form-grid > label.full {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .service-document-form .document-form-card {
    padding: 20px 16px 22px;
    border-radius: 14px;
  }

  .service-document-form .document-form-card > h2 {
    margin-bottom: 18px;
    font-size: 16px;
  }

  .service-document-form input:not([type="checkbox"]),
  .service-document-form select,
  .service-document-form textarea {
    font-size: 16px;
  }

  .service-document-form .document-submit-card {
    padding: 18px 16px;
  }
}
/* END MOZY SERVICE DOCUMENT DESIGN V1.2.0 */

/* ==================================================
   WhatsApp CRM v1
   ================================================== */

.whatsapp-page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.whatsapp-shell {
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  min-height: calc(100vh - 210px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.whatsapp-conversation-sidebar {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.whatsapp-search {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.whatsapp-search label,
.whatsapp-composer label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.whatsapp-search-row {
  display: flex;
  gap: 8px;
}

.whatsapp-search-row input {
  min-width: 0;
  flex: 1;
}

.whatsapp-conversation-list {
  max-height: calc(100vh - 310px);
  overflow-y: auto;
}

.whatsapp-conversation-item {
  display: flex;
  gap: 12px;
  padding: 15px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.whatsapp-conversation-item:hover {
  background: #ffffff;
}

.whatsapp-conversation-item.active {
  background: #eef5ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.whatsapp-conversation-item.needs-reply:not(.active) {
  background: #fff8ed;
}

.whatsapp-avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1668dc, #55a5ff);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(22, 104, 220, 0.2);
}

.whatsapp-conversation-summary {
  min-width: 0;
  flex: 1;
}

.whatsapp-conversation-topline {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.whatsapp-conversation-topline strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-conversation-topline time {
  flex: 0 0 auto;
  color: #7a8598;
  font-size: 10px;
}

.whatsapp-conversation-phone {
  margin-top: 2px;
  color: #657186;
  font-size: 11px;
  font-weight: 700;
}

.whatsapp-conversation-summary > p {
  margin: 6px 0 0;
  overflow: hidden;
  color: #596579;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-conversation-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
}

.whatsapp-unread-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.whatsapp-empty-list {
  padding: 24px 18px;
}

.whatsapp-chat-panel {
  display: flex;
  min-width: 0;
  min-height: 600px;
  flex-direction: column;
  background:
    linear-gradient(
      rgba(244, 247, 251, 0.94),
      rgba(244, 247, 251, 0.94)
    ),
    radial-gradient(circle at 20% 20%, #dce9fa 1px, transparent 1px);
  background-size: auto, 22px 22px;
}

.whatsapp-chat-header {
  display: flex;
  min-height: 82px;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.whatsapp-chat-header h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.whatsapp-chat-header p {
  margin: 5px 0 0;
  color: #68758a;
  font-size: 12px;
}

.whatsapp-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.whatsapp-message-history {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  max-height: calc(100vh - 410px);
  padding: 22px;
  overflow-y: auto;
}

.whatsapp-message {
  display: flex;
}

.whatsapp-message.incoming {
  justify-content: flex-start;
}

.whatsapp-message.outgoing {
  justify-content: flex-end;
}

.whatsapp-message-bubble {
  max-width: min(76%, 720px);
  padding: 11px 13px 8px;
  border: 1px solid #e2e7ef;
  border-radius: 15px 15px 15px 4px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(31, 42, 61, 0.08);
}

.whatsapp-message.outgoing .whatsapp-message-bubble {
  border-color: #c9ead5;
  border-radius: 15px 15px 4px 15px;
  background: #dcf8e7;
}

.whatsapp-message-bubble p {
  margin: 0;
  color: #202b3d;
  font-size: 14px;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.whatsapp-message-bubble time {
  display: block;
  margin-top: 7px;
  color: #718096;
  font-size: 10px;
  text-align: right;
}

.whatsapp-message-type {
  margin-bottom: 7px;
  color: #536176;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.whatsapp-media-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.whatsapp-composer {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.whatsapp-composer-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.whatsapp-composer textarea {
  min-height: 76px;
  flex: 1;
  resize: vertical;
}

.whatsapp-send-button {
  min-width: 110px;
}

.whatsapp-composer > small {
  display: block;
  margin-top: 8px;
  color: #778397;
}

.whatsapp-no-chat {
  display: grid;
  min-height: 560px;
  padding: 40px;
  place-content: center;
  text-align: center;
}

.whatsapp-no-chat-icon {
  margin-bottom: 12px;
  font-size: 48px;
}

.whatsapp-no-chat h2 {
  margin: 0;
  color: #273247;
}

.whatsapp-no-chat p {
  margin: 8px 0 0;
  color: #738096;
}

@media (max-width: 980px) {
  .whatsapp-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .whatsapp-message-bubble {
    max-width: 88%;
  }
}

@media (max-width: 760px) {
  .whatsapp-shell {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .whatsapp-conversation-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .whatsapp-conversation-list {
    max-height: 380px;
  }

  .whatsapp-chat-panel {
    min-height: 600px;
  }

  .whatsapp-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .whatsapp-chat-actions {
    justify-content: flex-start;
  }

  .whatsapp-message-history {
    max-height: 520px;
    padding: 15px;
  }

  .whatsapp-message-bubble {
    max-width: 92%;
  }

  .whatsapp-composer-row {
    flex-direction: column;
  }

  .whatsapp-send-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .whatsapp-search-row {
    flex-direction: column;
  }

  .whatsapp-search-row .button {
    width: 100%;
  }

  .whatsapp-conversation-item {
    padding: 14px 12px;
  }

  .whatsapp-chat-header {
    padding: 14px;
  }

  .whatsapp-message-history {
    padding: 12px;
  }

  .whatsapp-message-bubble {
    max-width: 96%;
  }
}

/* WhatsApp incoming media v1 */
.whatsapp-media-preview-link {
  display: block;
  margin-top: 8px;
}

.whatsapp-media-image {
  display: block;
  width: min(100%, 460px);
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  background: #eef2f7;
}

.whatsapp-media-audio {
  display: block;
  width: min(100%, 420px);
  margin-top: 10px;
}

.whatsapp-media-video {
  display: block;
  width: min(100%, 520px);
  max-height: 560px;
  margin-top: 10px;
  border-radius: 12px;
  background: #111827;
}

.whatsapp-media-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .whatsapp-media-image,
  .whatsapp-media-video,
  .whatsapp-media-audio {
    width: 100%;
  }
}

/* WhatsApp outgoing attachments v1 */
.whatsapp-attachment-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 8px 0 10px;
}

.whatsapp-media-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.whatsapp-attach-button {
  min-height: 42px;
}

.whatsapp-media-status {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  overflow-wrap: anywhere;
}

.whatsapp-attach-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* WhatsApp groups v1 */
.whatsapp-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0ecff;
  color: #175cd3;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: middle;
}

/* WhatsApp secondary action button */
.whatsapp-chat-actions .button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid #c7d0dd;
  border-radius: 8px;
  background: #ffffff;
  color: #26364d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.whatsapp-chat-actions .button.secondary:hover {
  border-color: #8fa0b7;
  background: #f5f7fa;
  color: #172033;
}

.whatsapp-chat-actions .button.secondary:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.25);
  outline-offset: 2px;
}


/* ==================================================
   WhatsApp – mark all read action
   ================================================== */

.whatsapp-mark-all-read-form {
  display: flex;
  margin: 0;
}

.whatsapp-mark-all-read-form .button.secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 16px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 11px;
  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f3f7ff 100%
    );
  box-shadow:
    0 4px 12px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.whatsapp-mark-all-read-form .button.secondary::before {
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background:
    linear-gradient(
      100deg,
      transparent,
      rgba(255, 255, 255, 0.75),
      transparent
    );
  content: "";
  transform: skewX(-18deg);
  transition: left 400ms ease;
}

.whatsapp-mark-all-read-form .button.secondary:hover {
  border-color: rgba(37, 99, 235, 0.48);
  background:
    linear-gradient(
      135deg,
      #f8fbff 0%,
      #eaf1ff 100%
    );
  box-shadow:
    0 7px 18px rgba(37, 99, 235, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: #1e40af;
  transform: translateY(-1px);
}

.whatsapp-mark-all-read-form .button.secondary:hover::before {
  left: 135%;
}

.whatsapp-mark-all-read-form .button.secondary:active {
  box-shadow:
    0 3px 8px rgba(37, 99, 235, 0.14);
  transform: translateY(0);
}

.whatsapp-mark-all-read-form .button.secondary:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.23);
  outline-offset: 2px;
}

.whatsapp-mark-read-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #3b82f6
    );
  box-shadow:
    0 3px 7px rgba(37, 99, 235, 0.24);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

/* ==================================================
   WhatsApp – creator signature
   ================================================== */

.whatsapp-creator-signature {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.9),
      rgba(239, 246, 255, 0.8)
    );
  box-shadow:
    0 3px 10px rgba(30, 64, 175, 0.05);
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.015em;
}

.whatsapp-creator-signature strong {
  color: #1d4ed8;
  font-weight: 800;
}

.whatsapp-creator-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.12);
}

@media (max-width: 720px) {
  .whatsapp-mark-all-read-form {
    width: 100%;
  }

  .whatsapp-mark-all-read-form .button.secondary {
    width: 100%;
  }

  .whatsapp-creator-signature {
    max-width: 100%;
    white-space: normal;
  }
}

/* ==================================================
   WhatsApp Premium UI v2
   Light, elegant, no external fonts
   ================================================== */

.whatsapp-layout,
.whatsapp-layout * {
  font-family:
    Inter,
    "Segoe UI",
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

.whatsapp-layout {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(186, 199, 220, 0.7);
  border-radius: 28px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.93) 0%,
      rgba(246,249,253,0.92) 100%
    );
  box-shadow:
    0 12px 30px rgba(16, 24, 40, 0.06),
    0 2px 10px rgba(16, 24, 40, 0.04);
  isolation: isolate;
}

.whatsapp-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at 92% 14%, rgba(47,111,237,0.08) 0, rgba(47,111,237,0.08) 2px, transparent 3px),
    radial-gradient(circle at 87% 19%, rgba(47,111,237,0.08) 0, rgba(47,111,237,0.08) 2px, transparent 3px),
    radial-gradient(circle at 82% 24%, rgba(47,111,237,0.08) 0, rgba(47,111,237,0.08) 2px, transparent 3px),
    linear-gradient(90deg, transparent 0 77%, rgba(47,111,237,0.045) 77% 77.15%, transparent 77.15% 100%),
    linear-gradient(180deg, transparent 0 14%, rgba(47,111,237,0.045) 14% 14.2%, transparent 14.2% 100%),
    linear-gradient(90deg, transparent 0 82%, rgba(47,111,237,0.045) 82% 82.15%, transparent 82.15% 100%),
    linear-gradient(180deg, transparent 0 19%, rgba(47,111,237,0.045) 19% 19.2%, transparent 19.2% 100%),
    linear-gradient(90deg, transparent 0 87%, rgba(47,111,237,0.045) 87% 87.15%, transparent 87.15% 100%),
    linear-gradient(180deg, transparent 0 24%, rgba(47,111,237,0.045) 24% 24.2%, transparent 24.2% 100%);
}

.whatsapp-layout::after {
  content: "";
  position: absolute;
  right: 44px;
  top: 42px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  opacity: 0.32;
  background:
    radial-gradient(circle at center, rgba(47,111,237,0.08), transparent 70%);
  filter: blur(18px);
}

.whatsapp-sidebar,
.whatsapp-chat-panel {
  position: relative;
  z-index: 1;
}

.whatsapp-sidebar {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.78),
      rgba(248,250,253,0.88)
    );
  backdrop-filter: blur(4px);
}

.whatsapp-chat-panel {
  background:
    linear-gradient(
      180deg,
      rgba(249,251,255,0.78),
      rgba(244,247,252,0.92)
    );
  backdrop-filter: blur(4px);
}

.whatsapp-page h1,
h1:has(+ p) {
  letter-spacing: -0.03em;
}

.whatsapp-page h1,
.whatsapp-layout h2,
.whatsapp-sidebar h2,
.whatsapp-chat-header h2 {
  font-weight: 800;
  color: #13213f;
}

.whatsapp-chat-header {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(213, 221, 233, 0.9);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.94),
      rgba(247,250,255,0.84)
    );
}

.whatsapp-chat-header p {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.whatsapp-creator-signature {
  margin-top: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(47,111,237,0.14);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.95),
      rgba(239,245,255,0.92)
    );
  box-shadow:
    0 8px 20px rgba(47,111,237,0.06);
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.whatsapp-creator-signature strong {
  color: #2457d6;
  font-weight: 800;
}

.whatsapp-creator-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #2f6fed, #5b8cff);
  box-shadow: 0 0 0 4px rgba(47,111,237,0.12);
}

/* search */

.whatsapp-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.whatsapp-search-row input,
.whatsapp-search-row input[type="search"],
.whatsapp-search-row input[type="text"] {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #d4dceb;
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  box-shadow:
    inset 0 1px 2px rgba(16,24,40,0.04),
    0 4px 10px rgba(16,24,40,0.03);
  color: #1f2a44;
  font-size: 14px;
  font-weight: 500;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.whatsapp-search-row input:focus,
.whatsapp-search-row input[type="search"]:focus,
.whatsapp-search-row input[type="text"]:focus {
  outline: none;
  border-color: rgba(47,111,237,0.45);
  box-shadow:
    0 0 0 4px rgba(47,111,237,0.10),
    inset 0 1px 2px rgba(16,24,40,0.04);
}

.whatsapp-search-row .button,
.whatsapp-search-row button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(47,111,237,0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #ffffff, #eef4ff);
  color: #173a8b;
  font-weight: 800;
  box-shadow:
    0 6px 16px rgba(47,111,237,0.08);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.whatsapp-search-row .button:hover,
.whatsapp-search-row button:hover {
  transform: translateY(-1px);
  border-color: rgba(47,111,237,0.28);
  box-shadow:
    0 10px 22px rgba(47,111,237,0.12);
}

/* conversation list */

.whatsapp-conversation-item,
.whatsapp-sidebar a,
.whatsapp-sidebar .conversation-item {
  border-radius: 18px;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.whatsapp-conversation-item:hover,
.whatsapp-sidebar a:hover,
.whatsapp-sidebar .conversation-item:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.06);
}

.whatsapp-conversation-item.active,
.whatsapp-sidebar a.active,
.whatsapp-sidebar .conversation-item.active {
  background:
    linear-gradient(
      135deg,
      rgba(239,245,255,0.95),
      rgba(228,238,255,0.92)
    );
  box-shadow:
    inset 3px 0 0 #2f6fed,
    0 12px 24px rgba(47,111,237,0.08);
}

/* message bubbles */

.whatsapp-message-history {
  background:
    linear-gradient(
      180deg,
      rgba(249,251,255,0.50),
      rgba(243,247,252,0.72)
    );
}

.whatsapp-message-bubble {
  border: 1px solid rgba(220, 227, 236, 0.92);
  border-radius: 18px;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.04);
}

.whatsapp-message.incoming .whatsapp-message-bubble {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.98),
      rgba(250,252,255,0.96)
    );
}

.whatsapp-message.outgoing .whatsapp-message-bubble {
  background:
    linear-gradient(
      180deg,
      rgba(231,248,236,0.98),
      rgba(217,242,226,0.96)
    );
  border-color: rgba(172, 220, 185, 0.85);
}

.whatsapp-message-bubble p {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.55;
}

.whatsapp-message-bubble time {
  color: #7a8798;
  font-size: 11px;
  font-weight: 600;
}

.whatsapp-media-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #2559dc;
  font-weight: 700;
  text-decoration: none;
}

.whatsapp-media-link:hover {
  text-decoration: underline;
}

/* composer */

.whatsapp-composer {
  padding: 18px 18px 16px;
  border-top: 1px solid rgba(213, 221, 233, 0.9);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.92),
      rgba(248,250,255,0.96)
    );
}

.whatsapp-composer label {
  color: #1f2d4d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.whatsapp-composer-row {
  gap: 12px;
  align-items: flex-end;
}

.whatsapp-composer textarea {
  min-height: 74px;
  padding: 14px 15px;
  border: 1px solid #d5dceb;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow:
    inset 0 1px 3px rgba(15,23,42,0.04),
    0 8px 20px rgba(15,23,42,0.03);
  color: #18253f;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.whatsapp-composer textarea:focus {
  outline: none;
  border-color: rgba(47,111,237,0.42);
  box-shadow:
    0 0 0 4px rgba(47,111,237,0.10),
    inset 0 1px 3px rgba(15,23,42,0.04);
}

.whatsapp-send-button,
.whatsapp-composer .button.primary,
.whatsapp-composer button[type="submit"] {
  min-width: 116px;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(36,87,214,0.12);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      #2f6fed 0%,
      #3d7cff 55%,
      #5c8fff 100%
    );
  box-shadow:
    0 14px 30px rgba(47,111,237,0.24),
    inset 0 1px 0 rgba(255,255,255,0.16);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.whatsapp-send-button:hover,
.whatsapp-composer .button.primary:hover,
.whatsapp-composer button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    0 18px 34px rgba(47,111,237,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.whatsapp-send-button:active,
.whatsapp-composer .button.primary:active,
.whatsapp-composer button[type="submit"]:active {
  transform: translateY(0);
}

/* attach button */

.whatsapp-composer .button.secondary,
.whatsapp-composer .button:not(.primary),
.whatsapp-composer button[type="button"],
.whatsapp-composer label.button,
.whatsapp-composer label[for*="file"],
.whatsapp-composer label[for*="upload"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(47,111,237,0.12);
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.98),
      rgba(241,246,255,0.94)
    );
  box-shadow:
    0 6px 16px rgba(16,24,40,0.05);
  color: #244eb2;
  font-weight: 700;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.whatsapp-composer .button.secondary:hover,
.whatsapp-composer .button:not(.primary):hover,
.whatsapp-composer button[type="button"]:hover,
.whatsapp-composer label.button:hover,
.whatsapp-composer label[for*="file"]:hover,
.whatsapp-composer label[for*="upload"]:hover {
  transform: translateY(-1px);
  border-color: rgba(47,111,237,0.25);
  box-shadow:
    0 10px 20px rgba(16,24,40,0.06);
}

/* top action buttons */

.whatsapp-chat-actions .button {
  min-height: 40px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow:
    0 8px 18px rgba(16,24,40,0.05);
}

/* mark all read button refinement */

.whatsapp-mark-all-read-form .button.secondary {
  border-radius: 15px;
  padding: 10px 17px;
  font-size: 14px;
}

/* scrollbar */

.whatsapp-sidebar,
.whatsapp-message-history {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 138, 168, 0.55) transparent;
}

.whatsapp-sidebar::-webkit-scrollbar,
.whatsapp-message-history::-webkit-scrollbar {
  width: 10px;
}

.whatsapp-sidebar::-webkit-scrollbar-track,
.whatsapp-message-history::-webkit-scrollbar-track {
  background: transparent;
}

.whatsapp-sidebar::-webkit-scrollbar-thumb,
.whatsapp-message-history::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(120, 138, 168, 0.50);
  background-clip: padding-box;
}

/* responsive */

@media (max-width: 1100px) {
  .whatsapp-layout {
    border-radius: 22px;
  }

  .whatsapp-chat-header,
  .whatsapp-composer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 720px) {
  .whatsapp-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .whatsapp-search-row .button,
  .whatsapp-search-row button,
  .whatsapp-send-button,
  .whatsapp-composer button[type="submit"] {
    width: 100%;
  }

  .whatsapp-composer textarea {
    min-height: 96px;
  }
}

/* ==================================================
   WhatsApp viewport fix + clearer typography
   ================================================== */

/*
 * Elimină scroll-ul general numai în pagina WhatsApp.
 * Chrome-ul actual suportă selectorul :has().
 */
html:has(.whatsapp-layout),
body:has(.whatsapp-layout) {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/*
 * Containerul principal al aplicației trebuie să ocupe
 * exact înălțimea ferestrei.
 */
body:has(.whatsapp-layout) {
  min-height: 100dvh;
}

body:has(.whatsapp-layout) main,
body:has(.whatsapp-layout) .main-content,
body:has(.whatsapp-layout) .content,
body:has(.whatsapp-layout) .page-content {
  min-height: 0;
}

/*
 * Zona paginii WhatsApp devine coloană flexibilă:
 * titlul rămâne sus, iar CRM-ul ocupă restul ecranului.
 */
body:has(.whatsapp-layout) main {
  display: flex;
  height: 100dvh;
  max-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

body:has(.whatsapp-layout) .whatsapp-page,
body:has(.whatsapp-layout) .page,
body:has(.whatsapp-layout) .page-shell {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

/*
 * Layout-ul WhatsApp ocupă tot spațiul disponibil,
 * fără să împingă pagina dincolo de viewport.
 */
body:has(.whatsapp-layout) .whatsapp-layout {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  margin-bottom: 8px;
  overflow: hidden;
}

/*
 * Coloanele interne trebuie să poată micșora conținutul
 * și să folosească propriile scroll-uri.
 */
.whatsapp-sidebar,
.whatsapp-chat-panel,
.whatsapp-conversation-list,
.whatsapp-message-history {
  min-height: 0;
}

.whatsapp-sidebar,
.whatsapp-chat-panel {
  height: 100%;
  overflow: hidden;
}

.whatsapp-conversation-list,
.whatsapp-message-history {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/*
 * Composer-ul rămâne fix în partea de jos a panoului,
 * fără să mărească înălțimea întregii pagini.
 */
.whatsapp-composer {
  flex: 0 0 auto;
}

.whatsapp-chat-header {
  flex: 0 0 auto;
}

.whatsapp-message-history {
  flex: 1 1 auto;
}

/* ==================================================
   Font mai clar și mai lizibil
   ================================================== */

body:has(.whatsapp-layout),
body:has(.whatsapp-layout) button,
body:has(.whatsapp-layout) input,
body:has(.whatsapp-layout) textarea,
body:has(.whatsapp-layout) select {
  font-family:
    "Segoe UI Variable Text",
    "Segoe UI Variable",
    "Segoe UI",
    Arial,
    sans-serif;
  font-feature-settings:
    "kern" 1,
    "liga" 1;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.whatsapp-layout {
  color: #17233b;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.006em;
}

.whatsapp-layout h1,
.whatsapp-layout h2,
.whatsapp-layout h3,
.whatsapp-chat-header h2,
.whatsapp-conversation-summary strong {
  font-family:
    "Segoe UI Variable Display",
    "Segoe UI Variable",
    "Segoe UI",
    Arial,
    sans-serif;
  color: #101c35;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.whatsapp-conversation-summary {
  line-height: 1.35;
}

.whatsapp-conversation-summary p,
.whatsapp-conversation-summary small {
  color: #53647e;
  font-size: 12px;
  font-weight: 450;
}

.whatsapp-message-bubble {
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.005em;
}

.whatsapp-message-bubble p {
  font-size: 14px;
  font-weight: 450;
  line-height: 1.52;
}

.whatsapp-message-bubble time {
  font-size: 11px;
  font-weight: 550;
}

.whatsapp-search-row input,
.whatsapp-composer textarea {
  font-family:
    "Segoe UI Variable Text",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 14px;
  font-weight: 450;
}

.whatsapp-search-row button,
.whatsapp-send-button,
.whatsapp-composer button[type="submit"],
.whatsapp-mark-all-read-form .button {
  font-family:
    "Segoe UI Variable Display",
    "Segoe UI",
    Arial,
    sans-serif;
  font-weight: 700;
}

/*
 * Bara de căutare puțin mai fină și mai rotunjită.
 */
.whatsapp-search-row input,
.whatsapp-search-row input[type="text"],
.whatsapp-search-row input[type="search"] {
  border-radius: 18px;
}

.whatsapp-search-row button,
.whatsapp-search-row .button {
  border-radius: 18px;
}

/*
 * Composer mai compact, pentru a lăsa mai mult loc mesajelor.
 */
.whatsapp-composer {
  padding-top: 14px;
  padding-bottom: 12px;
}

.whatsapp-composer textarea {
  min-height: 62px;
  max-height: 130px;
  border-radius: 17px;
}

.whatsapp-send-button,
.whatsapp-composer .button.primary,
.whatsapp-composer button[type="submit"] {
  min-height: 56px;
  border-radius: 17px;
}

/*
 * Pe ecrane joase reducem ușor zona de antet.
 */
@media (max-height: 850px) and (min-width: 721px) {
  body:has(.whatsapp-layout) .whatsapp-creator-signature {
    margin-top: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  body:has(.whatsapp-layout) .whatsapp-layout {
    margin-top: 10px;
  }

  .whatsapp-chat-header {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .whatsapp-composer {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .whatsapp-composer textarea {
    min-height: 54px;
  }
}

/*
 * Pe mobil permitem din nou scroll-ul normal al paginii.
 */
@media (max-width: 720px) {
  html:has(.whatsapp-layout),
  body:has(.whatsapp-layout) {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:has(.whatsapp-layout) main {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body:has(.whatsapp-layout) .whatsapp-layout {
    min-height: 720px;
    height: auto;
    overflow: hidden;
  }
}

/* ==================================================
   WhatsApp exact viewport fix v3
   Structură reală:
   .app-shell > .content > .whatsapp-shell
   ================================================== */

@media (min-width: 721px) {

  html:has(.whatsapp-shell),
  body:has(.whatsapp-shell) {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body:has(.whatsapp-shell) {
    min-height: 100vh;
  }

  body:has(.whatsapp-shell) .app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  body:has(.whatsapp-shell) .sidebar {
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
  }

  body:has(.whatsapp-shell) .content {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100vh;
    padding-top: 22px;
    padding-bottom: 14px;
    flex-direction: column;
    overflow: hidden;
  }

  body:has(.whatsapp-shell) .mobile-header {
    flex: 0 0 auto;
  }

  body:has(.whatsapp-shell) .whatsapp-page-heading {
    flex: 0 0 auto;
    margin-bottom: 14px;
  }

  body:has(.whatsapp-shell) .notice {
    flex: 0 0 auto;
  }

  body:has(.whatsapp-shell) > .app-shell > .content > footer {
    display: none;
  }

  body:has(.whatsapp-shell) .whatsapp-shell {
    display: grid;
    min-width: 0;
    min-height: 0;
    height: auto;
    flex: 1 1 auto;
    grid-template-columns:
      minmax(300px, 380px)
      minmax(0, 1fr);
    overflow: hidden;
  }

  body:has(.whatsapp-shell) .whatsapp-conversation-sidebar {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
  }

  body:has(.whatsapp-shell) .whatsapp-search {
    flex: 0 0 auto;
  }

  body:has(.whatsapp-shell) .whatsapp-conversation-list {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-header {
    flex: 0 0 auto;
  }

  body:has(.whatsapp-shell) .whatsapp-message-history {
    min-height: 0;
    max-height: none;
    flex: 1 1 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body:has(.whatsapp-shell) .whatsapp-composer {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
  }

  body:has(.whatsapp-shell) .whatsapp-no-chat {
    min-height: 0;
    height: 100%;
  }

  /*
   * Font clar, fără descărcări externe.
   */
  body:has(.whatsapp-shell),
  body:has(.whatsapp-shell) button,
  body:has(.whatsapp-shell) input,
  body:has(.whatsapp-shell) textarea,
  body:has(.whatsapp-shell) select {
    font-family:
      "Segoe UI",
      Tahoma,
      Arial,
      sans-serif;
    font-kerning: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
  }

  body:has(.whatsapp-shell) .whatsapp-shell {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-header h2,
  body:has(.whatsapp-shell) .whatsapp-conversation-summary strong,
  body:has(.whatsapp-shell) .whatsapp-search label,
  body:has(.whatsapp-shell) .whatsapp-composer label {
    font-family:
      "Segoe UI",
      Tahoma,
      Arial,
      sans-serif;
    font-weight: 700;
    letter-spacing: 0;
  }

  body:has(.whatsapp-shell) .whatsapp-message-bubble,
  body:has(.whatsapp-shell) .whatsapp-message-bubble p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
  }

  body:has(.whatsapp-shell) .whatsapp-conversation-summary p,
  body:has(.whatsapp-shell) .whatsapp-conversation-phone {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
  }

  /*
   * Composer compact pentru a păstra mai mult spațiu
   * istoricului conversației.
   */
  body:has(.whatsapp-shell) .whatsapp-composer {
    padding: 12px 16px 12px;
  }

  body:has(.whatsapp-shell) .whatsapp-composer label {
    margin-bottom: 7px;
  }

  body:has(.whatsapp-shell) .whatsapp-composer textarea {
    min-height: 58px;
    max-height: 110px;
    resize: none;
  }

  body:has(.whatsapp-shell) .whatsapp-send-button,
  body:has(.whatsapp-shell)
    .whatsapp-composer button[type="submit"] {
    min-height: 58px;
  }
}

/*
 * Pe mobil rămâne comportamentul normal, cu scroll de pagină.
 */
@media (max-width: 720px) {
  html:has(.whatsapp-shell),
  body:has(.whatsapp-shell) {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:has(.whatsapp-shell) .app-shell,
  body:has(.whatsapp-shell) .content {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body:has(.whatsapp-shell) .whatsapp-shell {
    height: auto;
    min-height: 720px;
  }
}

/* ==================================================
   WhatsApp — Apple Clean Signature
   ================================================== */

.whatsapp-page-heading--minimal {
  margin-bottom: 16px;
}

.whatsapp-signature-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 15px 18px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(250, 250, 252, 0.98)
    );
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 24px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.whatsapp-signature-hero::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(0, 122, 255, 0.07),
      transparent 62%
    );
  content: "";
}

.whatsapp-signature-hero::after {
  display: none;
}

.whatsapp-signature-orb {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin: 0;
  border: 1px solid rgba(0, 122, 255, 0.10);
  border-radius: 12px;
  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f2f6fb
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(15, 23, 42, 0.07);
  place-items: center;
}

.whatsapp-signature-orb::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #007aff;
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.10);
  content: "";
}

.whatsapp-signature-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.whatsapp-signature-kicker {
  color: #8a8a8e;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.whatsapp-signature-title {
  color: #1d1d1f;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.whatsapp-signature-title span {
  color: #007aff;
  font-weight: 700;
}

.whatsapp-signature-subtitle {
  margin: 2px 0 0;
  color: #6e6e73;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

/* Apple-clean harmonizare pentru modulul WhatsApp */

body:has(.whatsapp-shell) .whatsapp-shell {
  border-color: rgba(17, 24, 39, 0.08);
  border-radius: 22px;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.025),
    0 10px 30px rgba(15, 23, 42, 0.045);
}

body:has(.whatsapp-shell) .whatsapp-chat-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(17, 24, 39, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body:has(.whatsapp-shell) .whatsapp-conversation-sidebar {
  background: #fbfbfd;
}

body:has(.whatsapp-shell) .whatsapp-search {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(17, 24, 39, 0.07);
}

body:has(.whatsapp-shell) .whatsapp-search-row input {
  border-color: rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.025);
}

body:has(.whatsapp-shell) .whatsapp-search-row input:focus {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.09);
}

body:has(.whatsapp-shell) .whatsapp-search-row button {
  border-color: rgba(0, 122, 255, 0.12);
  border-radius: 14px;
  background: #f5f5f7;
  box-shadow: none;
  color: #007aff;
}

body:has(.whatsapp-shell) .whatsapp-conversation-item {
  margin: 4px 7px;
  border: 1px solid transparent;
  border-radius: 15px;
}

body:has(.whatsapp-shell) .whatsapp-conversation-item:hover {
  background: #f2f2f7;
  box-shadow: none;
  transform: none;
}

body:has(.whatsapp-shell) .whatsapp-conversation-item.active {
  border-color: rgba(0, 122, 255, 0.08);
  background: rgba(0, 122, 255, 0.075);
  box-shadow:
    inset 3px 0 0 #007aff;
}

body:has(.whatsapp-shell) .whatsapp-message-history {
  background:
    linear-gradient(
      180deg,
      #f8f9fb,
      #f5f6f8
    );
}

body:has(.whatsapp-shell) .whatsapp-message-bubble {
  border-color: rgba(17, 24, 39, 0.07);
  border-radius: 17px;
  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.045);
}

body:has(.whatsapp-shell)
  .whatsapp-message.incoming
  .whatsapp-message-bubble {
  background: #ffffff;
}

body:has(.whatsapp-shell)
  .whatsapp-message.outgoing
  .whatsapp-message-bubble {
  border-color: rgba(52, 199, 89, 0.16);
  background:
    linear-gradient(
      180deg,
      #e8f8ed,
      #def4e5
    );
}

body:has(.whatsapp-shell) .whatsapp-composer {
  border-top-color: rgba(17, 24, 39, 0.07);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body:has(.whatsapp-shell) .whatsapp-composer textarea {
  border-color: rgba(17, 24, 39, 0.10);
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.025);
}

body:has(.whatsapp-shell) .whatsapp-composer textarea:focus {
  border-color: rgba(0, 122, 255, 0.40);
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.09);
}

body:has(.whatsapp-shell) .whatsapp-send-button,
body:has(.whatsapp-shell)
  .whatsapp-composer button[type="submit"] {
  border: 0;
  border-radius: 16px;
  background: #007aff;
  box-shadow:
    0 7px 18px rgba(0, 122, 255, 0.22);
  color: #ffffff;
}

body:has(.whatsapp-shell) .whatsapp-send-button:hover,
body:has(.whatsapp-shell)
  .whatsapp-composer button[type="submit"]:hover {
  background: #087ff5;
  box-shadow:
    0 9px 22px rgba(0, 122, 255, 0.27);
}

body:has(.whatsapp-shell)
  .whatsapp-mark-all-read-form
  .button.secondary {
  border-color: rgba(0, 122, 255, 0.14);
  border-radius: 14px;
  background: #f5f5f7;
  box-shadow: none;
  color: #007aff;
}

body:has(.whatsapp-shell) .whatsapp-mark-read-icon {
  background: #007aff;
  box-shadow: none;
}

@media (max-width: 720px) {
  .whatsapp-signature-hero {
    min-height: 68px;
    padding: 13px 14px;
    border-radius: 17px;
  }

  .whatsapp-signature-orb {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .whatsapp-signature-title {
    font-size: 16px;
  }

  .whatsapp-signature-kicker {
    font-size: 9px;
  }

  .whatsapp-signature-subtitle {
    font-size: 11px;
  }
}

/* WhatsApp client notes — Apple Clean */

.whatsapp-chat-header > div:first-child {
  min-width: 280px;
  flex: 1 1 560px;
}

.whatsapp-client-notes {
  width: min(100%, 640px);
  margin-top: 12px;
}

.whatsapp-client-notes label {
  display: block;
  margin-bottom: 6px;
  color: #86868b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.whatsapp-client-notes-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.whatsapp-client-notes textarea {
  min-width: 0;
  min-height: 48px;
  max-height: 110px;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 13px;
  outline: none;
  background: #f8f8fa;
  color: #1d1d1f;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.whatsapp-client-notes textarea::placeholder {
  color: #a1a1a6;
}

.whatsapp-client-notes textarea:focus {
  border-color: rgba(0, 122, 255, 0.42);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.085);
}

.whatsapp-client-notes-save {
  min-width: 88px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: #f2f2f7;
  color: #007aff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.whatsapp-client-notes-save:hover {
  background: #e8e8ed;
  color: #0066d6;
}

.whatsapp-client-notes-save:active {
  transform: scale(0.98);
}

.whatsapp-client-notes-status {
  display: block;
  margin-top: 5px;
  color: #248a3d;
  font-size: 11px;
  font-weight: 600;
}

@media (min-width: 1100px) {
  .whatsapp-chat-header {
    gap: 22px;
    align-items: flex-start;
  }

  .whatsapp-chat-actions {
    flex: 0 0 auto;
    padding-top: 2px;
  }
}

@media (max-width: 900px) {
  .whatsapp-client-notes {
    width: 100%;
  }

  .whatsapp-client-notes-row {
    flex-direction: column;
  }

  .whatsapp-client-notes-save {
    min-height: 40px;
  }
}

/* ==================================================
   WhatsApp notes — Apple Clean v2
   ================================================== */

body:has(.whatsapp-shell) .whatsapp-chat-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 18px 20px;
}

body:has(.whatsapp-shell)
  .whatsapp-chat-header > div:first-child {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

body:has(.whatsapp-shell)
  .whatsapp-chat-header > div:first-child > h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

body:has(.whatsapp-shell)
  .whatsapp-chat-header > div:first-child > p {
  margin: 4px 0 0;
  color: #6b7a90;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* container notițe */

body:has(.whatsapp-shell) .whatsapp-client-notes {
  width: min(100%, 680px);
  margin: 13px 0 0;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.075);
  border-radius: 16px;
  background:
    linear-gradient(
      180deg,
      rgba(250, 250, 252, 0.98),
      rgba(247, 248, 250, 0.96)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(15, 23, 42, 0.035);
}

/* label */

body:has(.whatsapp-shell) .whatsapp-client-notes label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #6e6e73;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes label::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #007aff;
  box-shadow:
    0 0 0 3px rgba(0, 122, 255, 0.10);
  content: "";
}

/* rând textarea + buton */

body:has(.whatsapp-shell) .whatsapp-client-notes-row {
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

/* textarea */

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  max-height: 120px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(17, 24, 39, 0.11);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.025);
  color: #1d1d1f;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  resize: vertical;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea::placeholder {
  color: #9a9aa1;
  opacity: 1;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea:hover {
  border-color: rgba(17, 24, 39, 0.17);
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea:focus {
  border-color: rgba(0, 122, 255, 0.44);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.085),
    inset 0 1px 2px rgba(15, 23, 42, 0.025);
}

/* buton salvare */

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save {
  display: inline-flex;
  min-width: 98px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      180deg,
      #1683ff,
      #007aff
    );
  box-shadow:
    0 7px 17px rgba(0, 122, 255, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
  color: #ffffff;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save:hover {
  filter: brightness(1.035);
  transform: translateY(-1px);
  box-shadow:
    0 10px 21px rgba(0, 122, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save:active {
  filter: none;
  transform: translateY(0) scale(0.985);
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save:focus-visible {
  outline: 4px solid rgba(0, 122, 255, 0.14);
  outline-offset: 2px;
}

/* confirmare salvare */

body:has(.whatsapp-shell)
  .whatsapp-client-notes-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: #248a3d;
  font-size: 11px;
  font-weight: 650;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-status::before {
  content: "✓";
  font-size: 11px;
  font-weight: 800;
}

/* acțiuni dreapta */

body:has(.whatsapp-shell) .whatsapp-chat-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

/* ecrane mai înguste */

@media (max-width: 1150px) {
  body:has(.whatsapp-shell) .whatsapp-chat-header {
    flex-wrap: wrap;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body:has(.whatsapp-shell) .whatsapp-client-notes {
    padding: 10px;
    border-radius: 14px;
  }

  body:has(.whatsapp-shell)
    .whatsapp-client-notes-row {
    grid-template-columns: 1fr;
  }

  body:has(.whatsapp-shell)
    .whatsapp-client-notes-save {
    width: 100%;
    min-height: 43px;
  }
}

/* WhatsApp notes — saved state */

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save.is-saved {
  background:
    linear-gradient(
      180deg,
      #34c759,
      #28a745
    );
  box-shadow:
    0 7px 17px rgba(40, 167, 69, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
  color: #ffffff;
  cursor: default;
  opacity: 1;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save.is-saved:hover {
  filter: none;
  transform: none;
  box-shadow:
    0 7px 17px rgba(40, 167, 69, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save.is-saving {
  background:
    linear-gradient(
      180deg,
      #8e8e93,
      #737377
    );
  box-shadow:
    0 6px 15px rgba(60, 60, 67, 0.14);
  color: #ffffff;
  cursor: wait;
  opacity: 0.85;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save:disabled {
  opacity: 1;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-status {
  max-height: 24px;
  overflow: hidden;
  opacity: 1;
  transition:
    opacity 250ms ease,
    max-height 250ms ease,
    margin 250ms ease;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-status.is-hidden {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
}

/* ==================================================
   WhatsApp notes — autosave on blur
   ================================================== */

body:has(.whatsapp-shell)
  .whatsapp-client-notes-save {
  display: none !important;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes-row {
  display: block;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea {
  width: 100%;
  min-height: 58px;
  max-height: 120px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.025);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea:focus {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.085);
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea.is-saving {
  border-color: rgba(142, 142, 147, 0.28);
  background: #fafafa;
}

body:has(.whatsapp-shell)
  .whatsapp-client-notes textarea.is-saved {
  border-color: rgba(52, 199, 89, 0.24);
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status {
  display: block;
  min-height: 17px;
  margin-top: 7px;
  color: #86868b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 1;
  transition: opacity 220ms ease;
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status.is-dirty {
  color: #8e8e93;
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status.is-saving {
  color: #6e6e73;
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status.is-saved {
  color: #248a3d;
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status.is-error {
  color: #d70015;
}

body:has(.whatsapp-shell)
  .whatsapp-notes-autosave-status.is-faded {
  opacity: 0;
}

/* ==================================================
   WhatsApp notes inline header
   ================================================== */

body:has(.whatsapp-shell) .whatsapp-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

body:has(.whatsapp-shell) .whatsapp-chat-header-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1;
}

body:has(.whatsapp-shell) .whatsapp-chat-title-block {
  min-width: 220px;
  flex: 0 0 auto;
}

body:has(.whatsapp-shell) .whatsapp-chat-title-block h2 {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body:has(.whatsapp-shell) .whatsapp-chat-title-block p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline {
  flex: 1;
  min-width: 280px;
  max-width: 560px;
  margin: 0;
}

body:has(.whatsapp-shell) .whatsapp-inline-note-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body:has(.whatsapp-shell) .whatsapp-inline-note-shell:focus-within {
  border-color: rgba(0, 122, 255, 0.28);
  box-shadow:
    0 12px 34px rgba(15, 23, 42, 0.07),
    0 0 0 4px rgba(0, 122, 255, 0.08);
}

body:has(.whatsapp-shell) .whatsapp-inline-note-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:has(.whatsapp-shell) .whatsapp-inline-note-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0a84ff;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.10);
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline textarea {
  flex: 1;
  min-height: 34px;
  max-height: 88px;
  resize: none;
  padding: 6px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172033;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: none;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline textarea::placeholder {
  color: #9aa4b2;
  font-weight: 500;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline textarea.is-saving,
body:has(.whatsapp-shell) .whatsapp-client-notes--inline textarea.is-saved {
  background: transparent;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline .whatsapp-notes-autosave-status {
  min-width: 64px;
  margin: 0;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline .whatsapp-notes-autosave-status.is-saving {
  color: #64748b;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline .whatsapp-notes-autosave-status.is-saved {
  color: #16a34a;
}

body:has(.whatsapp-shell) .whatsapp-client-notes--inline .whatsapp-notes-autosave-status.is-error {
  color: #dc2626;
}

@media (max-width: 1180px) {
  body:has(.whatsapp-shell) .whatsapp-chat-header {
    flex-direction: column;
    align-items: stretch;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-header-main {
    flex-direction: column;
    align-items: stretch;
  }

  body:has(.whatsapp-shell) .whatsapp-chat-title-block {
    min-width: 0;
  }

  body:has(.whatsapp-shell) .whatsapp-client-notes--inline {
    max-width: none;
    min-width: 0;
  }

  body:has(.whatsapp-shell) .whatsapp-inline-note-shell {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body:has(.whatsapp-shell) .whatsapp-client-notes--inline .whatsapp-notes-autosave-status {
    width: 100%;
    text-align: left;
  }
}


/* === GARANTII INDEPENDENTE v1.0.0 === */
.warranty-heading-actions {
  margin: 0;
}

.warranty-search-panel {
  margin-bottom: 18px;
}

.warranty-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.warranty-search-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.warranty-search-form input {
  width: 100%;
}

.warranty-history-list {
  display: grid;
  gap: 14px;
}

.warranty-history-card {
  display: grid;
  gap: 14px;
}

.warranty-history-card.is-created {
  outline: 2px solid rgba(47, 111, 237, 0.35);
  box-shadow: 0 14px 34px rgba(47, 111, 237, 0.12);
}

.warranty-history-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.warranty-history-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.warranty-history-main p {
  margin: 0 0 5px;
}

.warranty-history-meta {
  display: grid;
  gap: 5px;
  min-width: 190px;
  text-align: right;
}

.warranty-history-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.warranty-history-actions form {
  margin: 0;
}

.warranty-sent-info {
  text-align: right;
}

@media (max-width: 720px) {
  .warranty-search-form {
    grid-template-columns: 1fr;
  }

  .warranty-search-form .button,
  .warranty-heading-actions .button,
  .warranty-history-actions .button {
    width: 100%;
  }

  .warranty-history-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .warranty-history-meta,
  .warranty-sent-info {
    text-align: left;
  }

  .warranty-history-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* === END GARANTII INDEPENDENTE v1.0.0 === */

/* === GARANTII DESIGN v1.1.0 === */

/*
 * Formularul este stilizat strict în interiorul .warranty-form,
 * astfel încât să nu modifice formularele din restul CRM-ului.
 */

.warranty-form {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.warranty-form,
.warranty-form * {
  box-sizing: border-box;
}

.warranty-form > .panel {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 26px 28px 28px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(47, 111, 237, 0.025),
      rgba(255, 255, 255, 0) 42%
    ),
    #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 30px rgba(15, 23, 42, 0.055);
}

.warranty-form > .panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(
    180deg,
    #2f6fed 0%,
    #6595f5 100%
  );
}

.warranty-form .panel h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #13213a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.warranty-form .panel h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    #d9e3f1 0%,
    rgba(217, 227, 241, 0) 100%
  );
}

.warranty-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  align-items: start;
}

.warranty-form .form-grid > label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  color: #344258;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.warranty-form .form-grid > label.full {
  grid-column: 1 / -1;
}

.warranty-form input,
.warranty-form textarea,
.warranty-form select {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 1px solid #cbd6e5;
  border-radius: 11px;
  outline: none;
  background-color: #fbfcfe;
  color: #17243a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.warranty-form input,
.warranty-form select {
  min-height: 46px;
  padding: 10px 13px;
}

.warranty-form textarea {
  min-height: 100px;
  padding: 12px 13px;
  resize: vertical;
}

.warranty-form textarea[name="interventie_efectuata"] {
  min-height: 125px;
}

.warranty-form input:hover,
.warranty-form textarea:hover,
.warranty-form select:hover {
  border-color: #aebed3;
  background-color: #ffffff;
}

.warranty-form input:focus,
.warranty-form textarea:focus,
.warranty-form select:focus {
  border-color: #2f6fed;
  background-color: #ffffff;
  box-shadow:
    0 0 0 4px rgba(47, 111, 237, 0.12),
    0 5px 14px rgba(47, 111, 237, 0.08);
}

.warranty-form input:required,
.warranty-form textarea:required,
.warranty-form select:required {
  border-left-width: 3px;
}

.warranty-form input::placeholder,
.warranty-form textarea::placeholder {
  color: #8a98ab;
  opacity: 1;
}

.warranty-form select {
  cursor: pointer;
}

.warranty-form input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.warranty-form .warranty-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(47, 111, 237, 0.07),
      rgba(47, 111, 237, 0.015)
    ),
    #ffffff;
}

.warranty-form .warranty-actions::before {
  background: #2f6fed;
}

.warranty-form .warranty-actions p {
  max-width: 760px;
  margin: 0;
  color: #5b687c;
  font-size: 14px;
  line-height: 1.6;
}

.warranty-form .warranty-actions .button {
  flex: 0 0 auto;
  min-width: 190px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.22);
}

.warranty-form .warranty-actions .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(47, 111, 237, 0.27);
}

.warranty-heading-actions {
  flex-shrink: 0;
  margin: 0;
}

.warranty-heading-actions .button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 11px;
  white-space: nowrap;
  font-weight: 750;
}

/* Istoric garanții */

.warranty-search-panel {
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.warranty-search-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.warranty-search-form label {
  display: grid;
  gap: 8px;
  color: #344258;
  font-size: 14px;
  font-weight: 700;
}

.warranty-search-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  outline: none;
  background: #fbfcfe;
  font: inherit;
}

.warranty-search-form input:focus {
  border-color: #2f6fed;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.warranty-history-list {
  display: grid;
  gap: 15px;
}

.warranty-history-card {
  display: grid;
  gap: 15px;
  padding: 22px 24px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.warranty-history-card:hover {
  transform: translateY(-1px);
  border-color: #c6d4e7;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.075);
}

.warranty-history-card.is-created {
  border-color: rgba(47, 111, 237, 0.5);
  box-shadow:
    0 0 0 3px rgba(47, 111, 237, 0.1),
    0 12px 30px rgba(47, 111, 237, 0.12);
}

.warranty-history-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.warranty-history-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.warranty-history-title strong {
  color: #17243a;
  font-size: 17px;
}

.warranty-history-main p {
  margin: 0 0 6px;
  color: #4e5d72;
}

.warranty-history-meta {
  display: grid;
  gap: 6px;
  min-width: 210px;
  text-align: right;
  color: #5c6a7e;
}

.warranty-history-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e5ebf3;
}

.warranty-history-actions form {
  margin: 0;
}

.warranty-sent-info {
  text-align: right;
  color: #5b687c;
}

@media (max-width: 900px) {
  .warranty-form > .panel {
    padding: 23px 22px 24px;
  }

  .warranty-form .form-grid {
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .warranty-form {
    gap: 15px;
  }

  .warranty-form > .panel {
    padding: 20px 17px 21px;
    border-radius: 15px;
  }

  .warranty-form .panel h2 {
    margin-bottom: 18px;
    font-size: 17px;
  }

  .warranty-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .warranty-form .form-grid > label.full {
    grid-column: auto;
  }

  .warranty-form input,
  .warranty-form select {
    min-height: 48px;
    font-size: 16px;
  }

  .warranty-form textarea {
    font-size: 16px;
  }

  .warranty-form .warranty-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .warranty-form .warranty-actions .button,
  .warranty-heading-actions .button {
    width: 100%;
    min-width: 0;
  }

  .warranty-search-form {
    grid-template-columns: 1fr;
  }

  .warranty-search-form .button {
    width: 100%;
  }

  .warranty-history-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .warranty-history-meta,
  .warranty-sent-info {
    min-width: 0;
    text-align: left;
  }

  .warranty-history-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .warranty-history-actions .button {
    width: 100%;
  }
}

/* === END GARANTII DESIGN v1.1.0 === */

/* COMPACT DRIVER APPOINTMENTS V1.0 */

.technician-appointment-card {
  gap: 10px;
  padding: 14px 16px;
  overflow: visible;
}

.appointment-driver-summary {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.15fr)
    minmax(220px, 1fr)
    minmax(210px, 0.75fr);
  gap: 0;
  border: 1px solid #e1e7f0;
  border-radius: 11px;
  background: #f8fafc;
}

.appointment-driver-block {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e1e7f0;
}

.appointment-driver-block:last-child {
  border-right: 0;
}

.appointment-driver-block > small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.appointment-driver-block > strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.appointment-driver-block > span,
.appointment-driver-block > a {
  overflow-wrap: anywhere;
  line-height: 1.42;
}

.appointment-driver-phone {
  width: max-content;
  max-width: 100%;
  color: #175cd3;
  font-weight: 800;
  text-decoration: none;
}

.appointment-driver-address {
  color: #344054;
}

.appointment-driver-prices {
  display: grid;
  gap: 5px;
}

.appointment-driver-prices > span {
  display: grid;
  gap: 1px;
}

.appointment-driver-prices small {
  color: #667085;
  font-size: 12px;
}

.appointment-existing-notes-compact {
  padding: 9px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  background: #fff;
}

.appointment-existing-notes-compact p {
  margin: 3px 0 0;
  white-space: pre-wrap;
}

.appointment-driver-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.appointment-action-menu {
  position: relative;
}

.appointment-action-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.appointment-action-menu > summary::-webkit-details-marker {
  display: none;
}

.appointment-action-menu > summary::after {
  margin-left: 7px;
  content: "▾";
  font-size: 11px;
}

.appointment-action-menu[open] > summary {
  border-color: #84adff;
  background: #eff4ff;
}

.appointment-action-menu[open] > summary::after {
  content: "▴";
}

.appointment-action-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  gap: 7px;
  width: 240px;
  box-sizing: border-box;
  border: 1px solid #d7e0ec;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.18);
}

.appointment-result-menu .appointment-action-popover {
  right: 0;
  left: auto;
  width: min(370px, calc(100vw - 52px));
}

.appointment-menu-option {
  display: block;
  border-radius: 8px;
  padding: 11px 12px;
  color: #182033;
  background: #f8fafc;
  font-weight: 750;
  text-decoration: none;
}

.appointment-menu-option:hover {
  color: #175cd3;
  background: #eff4ff;
}

.appointment-compact-result-form {
  display: grid;
  gap: 10px;
}

.appointment-compact-result-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.appointment-compact-result-form textarea {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 10px;
  resize: vertical;
  color: #182033;
  background: #fff;
  font: inherit;
}

.appointment-compact-result-form textarea:focus {
  border-color: #84adff;
  outline: 3px solid rgba(47, 111, 237, 0.13);
}

.appointment-result-menu-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.appointment-result-menu-actions .button {
  min-width: 0;
  padding-inline: 9px;
  white-space: normal;
}

.appointment-more {
  margin-top: 1px;
  border-top: 1px solid #e5eaf1;
  padding-top: 8px;
}

@media (max-width: 950px) {
  .appointment-driver-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-driver-commercial {
    grid-column: 1 / -1;
    border-top: 1px solid #e1e7f0;
  }

  .appointment-driver-block:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 650px) {
  .technician-appointment-card {
    padding: 12px;
  }

  .appointment-driver-summary {
    grid-template-columns: 1fr;
  }

  .appointment-driver-block {
    border-right: 0;
    border-bottom: 1px solid #e1e7f0;
    padding: 11px 12px;
  }

  .appointment-driver-block:last-child {
    border-bottom: 0;
  }

  .appointment-driver-commercial {
    grid-column: auto;
    border-top: 0;
  }

  .appointment-driver-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .appointment-driver-actions > .button,
  .appointment-driver-actions > details > summary {
    justify-content: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-inline: 8px;
  }

  .appointment-action-popover {
    width: min(280px, calc(100vw - 48px));
  }

  .appointment-result-menu .appointment-action-popover {
    right: 0;
    left: auto;
    width: min(350px, calc(100vw - 48px));
  }

  .appointment-result-menu-actions {
    grid-template-columns: 1fr;
  }
}

/* WHATSAPP_ORGANIZER_V1 */
.whatsapp-organizer-toolbar {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--line);
}

.whatsapp-organizer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef3f9;
}

.whatsapp-organizer-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.whatsapp-organizer-tabs a.active {
  color: var(--navy);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(18, 26, 51, 0.1);
}

.whatsapp-label-filter {
  display: grid;
  gap: 6px;
}

.whatsapp-label-filter > label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.whatsapp-label-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.whatsapp-label-filter select,
.whatsapp-label-add-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--white);
}

.whatsapp-archived-badge {
  color: #475467;
  background: #eef2f6;
}

.whatsapp-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  padding: 4px 8px;
  border: 1px solid #c7d7f3;
  border-radius: 999px;
  color: #274b82;
  background: #edf4ff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whatsapp-organizer-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.whatsapp-label-manager {
  position: relative;
}

.whatsapp-label-manager > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.whatsapp-label-manager > summary::-webkit-details-marker {
  display: none;
}

.whatsapp-label-manager > summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font-size: 0.72rem;
}

.whatsapp-label-manager[open] > summary {
  border-color: #9db9e8;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.whatsapp-label-manager-body {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(18, 26, 51, 0.18);
}

.whatsapp-current-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.whatsapp-label-remove-form {
  margin: 0;
}

.whatsapp-label-chip--button {
  max-width: 260px;
  font: inherit;
  cursor: pointer;
}

.whatsapp-label-chip--button:hover {
  border-color: #e7a4a0;
  color: #9b1c1c;
  background: #fff1f0;
}

.whatsapp-label-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.whatsapp-label-empty,
.whatsapp-local-only-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.whatsapp-local-only-note {
  margin-left: auto;
}

@media (max-width: 760px) {
  .whatsapp-organizer-toolbar {
    padding-inline: 10px;
  }

  .whatsapp-organizer-panel {
    align-items: stretch;
    padding: 10px;
  }

  .whatsapp-archive-form,
  .whatsapp-label-manager {
    flex: 1 1 auto;
  }

  .whatsapp-archive-form .button,
  .whatsapp-label-manager > summary {
    width: 100%;
    justify-content: center;
  }

  .whatsapp-label-manager-body {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 65vh;
    overflow: auto;
  }

  .whatsapp-local-only-note {
    flex-basis: 100%;
    margin-left: 0;
    text-align: center;
  }
}

/* WHATSAPP_ORGANIZER_POLISH_V2 */

.whatsapp-organizer-toolbar {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  border-top: 1px solid #e6ebf2;
  border-bottom: 1px solid #dfe6ef;
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f7f9fc 100%
    );
}

.whatsapp-organizer-toolbar
.whatsapp-organizer-tabs {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 1fr)
  );
  gap: 5px;
  padding: 5px;
  margin: 0;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #edf2f8;
  box-shadow:
    inset 0 1px 2px
    rgba(18, 26, 51, 0.04);
}

.whatsapp-organizer-toolbar
.whatsapp-organizer-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #667085;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.whatsapp-organizer-toolbar
.whatsapp-organizer-tabs a:hover {
  color: #234b91;
  background: rgba(255, 255, 255, 0.72);
}

.whatsapp-organizer-toolbar
.whatsapp-organizer-tabs a.active {
  border-color: #c9d9f4;
  color: #155eef;
  background: #ffffff;
  box-shadow:
    0 4px 12px
    rgba(30, 64, 175, 0.12);
}

.whatsapp-organizer-toolbar
.whatsapp-organizer-tabs a:active {
  transform: translateY(1px);
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #e0e7f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    0 5px 16px
    rgba(18, 26, 51, 0.05);
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter > label {
  margin: 0;
  color: #667085;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  line-height: 1;
  text-transform: uppercase;
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 8px;
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter select {
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding:
    0
    38px
    0
    12px;
  border: 1px solid #ccd6e3;
  border-radius: 11px;
  outline: none;
  color: #25324b;
  background-color: #ffffff;
  background-image:
    linear-gradient(
      45deg,
      transparent 50%,
      #667085 50%
    ),
    linear-gradient(
      135deg,
      #667085 50%,
      transparent 50%
    );
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter select:hover {
  border-color: #9eb5d4;
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter select:focus {
  border-color: #2f6fed;
  box-shadow:
    0 0 0 3px
    rgba(47, 111, 237, 0.14);
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter-row
.button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 42px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid #2f6fed;
  border-radius: 11px;
  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      #3478f6 0%,
      #2563d9 100%
    );
  box-shadow:
    0 5px 12px
    rgba(47, 111, 237, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter-row
.button.secondary:hover {
  filter: brightness(1.04);
  box-shadow:
    0 7px 16px
    rgba(47, 111, 237, 0.28);
}

.whatsapp-organizer-toolbar
.whatsapp-label-filter-row
.button.secondary:active {
  transform: translateY(1px);
}

@media (max-width: 520px) {
  .whatsapp-organizer-toolbar {
    gap: 11px;
    padding: 11px 12px 13px;
  }

  .whatsapp-organizer-toolbar
  .whatsapp-organizer-tabs a {
    min-height: 36px;
    padding-inline: 5px;
    font-size: 0.78rem;
  }

  .whatsapp-organizer-toolbar
  .whatsapp-label-filter {
    padding: 10px;
  }

  .whatsapp-organizer-toolbar
  .whatsapp-label-filter-row {
    grid-template-columns:
      minmax(0, 1fr)
      88px;
  }

  .whatsapp-organizer-toolbar
  .whatsapp-label-filter-row
  .button.secondary {
    min-width: 88px;
    padding-inline: 8px;
  }
}

/* WHATSAPP_EMPTY_ARCHIVE_FIX_V1 */
.whatsapp-empty-list {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 18px 14px;
  padding: 24px 16px;
  border: 1px dashed #cbd7e7;
  border-radius: 14px;
  color: #667085;
  background: #f8fafc;
  text-align: center;
}

.whatsapp-empty-list strong {
  color: #25324b;
  font-size: 0.9rem;
}

.whatsapp-empty-list span {
  max-width: 260px;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* WHATSAPP_ASSETS_LISTS_V1 */
.whatsapp-avatar {
  overflow: hidden;
}

.whatsapp-avatar img,
.whatsapp-chat-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.whatsapp-avatar span,
.whatsapp-chat-profile-avatar span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.whatsapp-chat-profile-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 2px solid #dce8f8;
  border-radius: 50%;
  color: #155eef;
  background: #eaf2ff;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(18, 26, 51, 0.09);
}

.whatsapp-crm-list-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 190px;
  padding: 4px 8px;
  border: 1px solid #b9e4d2;
  border-radius: 999px;
  color: #166047;
  background: #eafaf3;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.whatsapp-crm-list-chip {
  font: inherit;
  cursor: pointer;
}

button.whatsapp-crm-list-chip:hover {
  border-color: #e7a4a0;
  color: #9b1c1c;
  background: #fff1f0;
}

.whatsapp-crm-list-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e4eaf2;
}

.whatsapp-crm-list-create-form input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd6e3;
  border-radius: 10px;
  color: #25324b;
  background: #fff;
}

.whatsapp-media-unavailable {
  display: grid;
  gap: 5px;
  width: min(360px, 100%);
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px dashed #cbd7e7;
  border-radius: 12px;
  color: #667085;
  background: #f8fafc;
}

.whatsapp-media-unavailable strong {
  color: #344054;
  font-size: 0.82rem;
}

.whatsapp-media-unavailable span {
  font-size: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .whatsapp-chat-profile-avatar {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .whatsapp-crm-list-create-form {
    grid-template-columns: 1fr;
  }
}
/* WHATSAPP_AVATAR_LAYOUT_FIX_V1_BEGIN */

/*
 * Avatarurile trebuie izolate de dimensiunea intrinsecă
 * a imaginilor WhatsApp.
 */
body:has(.whatsapp-shell) .whatsapp-avatar {
  position: relative;
  display: grid;
  flex: 0 0 43px !important;
  width: 43px !important;
  min-width: 43px !important;
  max-width: 43px !important;
  height: 43px !important;
  min-height: 43px !important;
  max-height: 43px !important;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}

body:has(.whatsapp-shell)
.whatsapp-chat-profile-avatar {
  position: relative;
  display: grid;
  flex: 0 0 52px !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}

/*
 * Poza este scoasă din calculul dimensiunii flex.
 * Astfel nu mai poate lărgi containerul.
 */
body:has(.whatsapp-shell) .whatsapp-avatar img,
body:has(.whatsapp-shell)
.whatsapp-chat-profile-avatar img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  object-fit: cover !important;
  object-position: center !important;
}

body:has(.whatsapp-shell) .whatsapp-avatar span,
body:has(.whatsapp-shell)
.whatsapp-chat-profile-avatar span {
  position: absolute;
  inset: 0;
  display: grid;
  width: auto;
  height: auto;
  place-items: center;
}

body:has(.whatsapp-shell)
.whatsapp-conversation-item {
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}

body:has(.whatsapp-shell)
.whatsapp-conversation-summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

body:has(.whatsapp-shell)
.whatsapp-conversation-summary p,
body:has(.whatsapp-shell)
.whatsapp-conversation-topline strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 900px) {
  body:has(.whatsapp-shell)
  .whatsapp-chat-header-main {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap;
  }

  body:has(.whatsapp-shell)
  .whatsapp-chat-title-block {
    flex: 0 1 auto;
    min-width: 170px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-client-notes--inline {
    flex: 1 1 340px;
    min-width: 220px;
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  body:has(.whatsapp-shell)
  .whatsapp-chat-profile-avatar {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-self: flex-start;
  }
}

/* WHATSAPP_AVATAR_LAYOUT_FIX_V1_END */

/* WHATSAPP_ERGONOMIC_DESKTOP_V1_BEGIN */

@media (min-width: 1100px) {
  /*
   * Folosim mai mult din suprafața monitorului.
   */
  body:has(.whatsapp-shell) .content {
    padding:
      12px
      16px
      10px !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-page-heading {
    margin-bottom: 10px !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-signature-hero {
    min-height: 58px;
    padding: 10px 16px;
    border-radius: 18px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-signature-orb {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-signature-title {
    font-size: 17px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-signature-subtitle {
    margin-top: 1px;
    font-size: 11px;
  }

  /*
   * Bara „Mesaj nou primit” rămâne vizibilă,
   * dar nu mai consumă excesiv din înălțime.
   */
  body:has(.whatsapp-shell)
  .content > .notice {
    display: flex;
    min-height: 38px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    padding: 8px 16px;
    border-radius: 12px;
  }

  /*
   * Sidebar mai lat și zonă de chat mai aerisită.
   */
  body:has(.whatsapp-shell)
  .whatsapp-shell {
    grid-template-columns:
      clamp(360px, 24vw, 430px)
      minmax(0, 1fr) !important;
    border-radius: 24px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-search {
    padding: 16px 18px 15px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-toolbar {
    gap: 10px;
    padding: 12px 14px 14px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-tabs a {
    min-height: 40px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-toolbar
  .whatsapp-label-filter {
    gap: 7px;
    padding: 10px 11px;
    border-radius: 13px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-conversation-list {
    padding: 3px 0 10px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-conversation-item {
    gap: 13px;
    margin: 5px 9px;
    padding: 14px 15px;
    border-radius: 16px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-conversation-summary {
    display: grid;
    gap: 3px;
  }

  /*
   * Antetul conversației.
   */
  body:has(.whatsapp-shell)
  .whatsapp-chat-header {
    min-height: 104px;
    box-sizing: border-box;
    gap: 22px;
    padding: 18px 24px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-chat-header-main {
    gap: 16px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-chat-title-block {
    flex: 0 1 240px;
    min-width: 190px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-client-notes--inline {
    min-width: 260px;
    max-width: 700px;
    flex: 1 1 440px;
    margin: 0;
  }

  body:has(.whatsapp-shell)
  .whatsapp-chat-actions {
    gap: 10px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-panel {
    gap: 12px;
    padding: 11px 20px;
  }

  /*
   * Istoric mesaje cu spațiu mai natural.
   */
  body:has(.whatsapp-shell)
  .whatsapp-message-history {
    gap: 12px;
    padding: 22px 26px 26px;
    scroll-padding-block:
      22px
      26px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-bubble {
    max-width: min(74%, 820px);
    padding: 12px 16px 10px;
    border-radius: 18px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-bubble p {
    margin: 0 0 6px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-bubble time {
    line-height: 1.35;
  }

  body:has(.whatsapp-shell)
  .whatsapp-media-image {
    display: block;
    width: auto;
    max-width: min(520px, 100%);
    max-height: 420px;
    border-radius: 14px;
    object-fit: contain;
  }

  /*
   * Zona de scriere este mai comodă,
   * fără să ocupe inutil prea mult ecran.
   */
  body:has(.whatsapp-shell)
  .whatsapp-composer {
    padding: 15px 20px 14px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-composer label {
    margin-bottom: 8px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-attachment-controls {
    margin-bottom: 10px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-composer-row {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    align-items: stretch;
    gap: 12px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-composer textarea {
    min-height: 72px;
    max-height: 150px;
    padding: 13px 15px;
    resize: vertical;
  }

  body:has(.whatsapp-shell)
  .whatsapp-composer
  button[type="submit"] {
    min-width: 124px;
    min-height: 64px;
    align-self: stretch;
  }
}

/*
 * Pe monitoare mari, filtrele folosesc mai eficient
 * lățimea sidebarului și lasă loc pentru mai multe conversații.
 */
@media (min-width: 1500px) {
  body:has(.whatsapp-shell)
  .content {
    padding:
      10px
      14px
      10px !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-shell {
    grid-template-columns:
      clamp(410px, 25vw, 460px)
      minmax(0, 1fr) !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-toolbar {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-tabs {
    grid-column: 1 / -1;
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-toolbar
  .whatsapp-label-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body:has(.whatsapp-shell)
  .whatsapp-organizer-toolbar
  .whatsapp-label-filter-row
  .button.secondary {
    width: 100%;
    min-width: 0;
    height: 36px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-chat-header {
    padding:
      20px
      28px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-history {
    padding:
      26px
      32px
      30px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-bubble {
    max-width: min(68%, 860px);
  }

  body:has(.whatsapp-shell)
  .whatsapp-composer {
    padding:
      17px
      26px
      15px;
  }
}

/*
 * Laptopuri: păstrăm spațiul util fără a înghesui chatul.
 */
@media (
  min-width: 721px
) and (
  max-width: 1099px
) {
  body:has(.whatsapp-shell)
  .content {
    padding:
      12px
      10px
      10px !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-shell {
    grid-template-columns:
      330px
      minmax(0, 1fr) !important;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-history {
    padding:
      18px
      20px
      22px;
  }

  body:has(.whatsapp-shell)
  .whatsapp-message-bubble {
    max-width: 84%;
  }
}

/* WHATSAPP_ERGONOMIC_DESKTOP_V1_END */

/* === MODUL RECENZII v1.0.0 === */
.review-page-heading {
  margin-bottom: 20px;
}

.review-form {
  max-width: 980px;
  margin-bottom: 22px;
}

.review-compose-card,
.review-history-panel {
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.review-compose-card {
  padding: 26px;
}

.review-field-grid {
  display: grid;
  gap: 20px;
}

.review-field-grid label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

.review-field-grid input,
.review-field-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fbfdff;
  color: #0f172a;
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.review-field-grid input {
  min-height: 48px;
  padding: 11px 14px;
}

.review-field-grid textarea {
  min-height: 285px;
  padding: 14px;
  line-height: 1.55;
  resize: vertical;
}

.review-field-grid input:focus,
.review-field-grid textarea:focus {
  border-color: #2f6fed;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 111, 237, .12);
}

.review-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.review-submit-row p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.review-send-button {
  min-width: 210px;
  min-height: 48px;
  border-radius: 12px;
}

.review-warning {
  max-width: 980px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #f3cf74;
  border-radius: 14px;
  background: #fff9e8;
  color: #704d00;
}

.review-warning p {
  margin: 6px 0;
}

.review-history-panel {
  max-width: 980px;
  padding: 24px 26px;
}

.review-history-heading h2 {
  margin: 4px 0 18px;
}

.review-history-list {
  display: grid;
  gap: 10px;
}

.review-history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 16px;
  padding: 15px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.review-history-item > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.review-history-item small {
  color: #64748b;
}

.review-status {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.review-status.trimisa {
  background: #dcfce7;
  color: #166534;
}

.review-status.eroare {
  background: #fee2e2;
  color: #991b1b;
}

.review-status.in_curs {
  background: #dbeafe;
  color: #1d4ed8;
}

.review-error-text {
  grid-column: 1 / -1;
  margin: 0;
  color: #b91c1c;
  font-size: 13px;
}

@media (max-width: 720px) {
  .review-compose-card,
  .review-history-panel {
    padding: 19px 16px;
    border-radius: 15px;
  }

  .review-field-grid input,
  .review-field-grid textarea {
    font-size: 16px;
  }

  .review-submit-row {
    display: grid;
  }

  .review-send-button {
    width: 100%;
    min-width: 0;
  }

  .review-history-item {
    grid-template-columns: 1fr;
  }
}
/* === END MODUL RECENZII v1.0.0 === */

/* === PROGRAMARI COMPACT v1.0.0 === */
.technician-form-panel { padding: 14px 16px !important; }
.technician-appointment-form { gap: 12px !important; }
.technician-appointment-form .appointment-form-section {
  padding: 12px 16px 14px !important;
  border-radius: 12px !important;
}
.technician-appointment-form .appointment-form-section legend {
  padding: 0 7px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}
.technician-appointment-form .appointment-form-grid { gap: 10px 14px !important; }
.technician-appointment-form label { gap: 5px !important; }
.technician-appointment-form input,
.technician-appointment-form select {
  min-height: 40px !important;
  height: 40px !important;
  padding: 7px 11px !important;
}
.technician-appointment-form textarea {
  min-height: 52px !important;
  padding: 8px 11px !important;
  line-height: 1.35 !important;
  resize: vertical;
}
.technician-appointment-form textarea[name="adresa"] { min-height: 44px !important; }
.technician-appointment-form .appointment-form-help {
  margin: 0 0 8px !important;
  font-size: 13px !important;
}
.technician-appointment-form .appointment-price-editor,
.technician-appointment-form .appointment-price-rows { gap: 8px !important; }
.technician-appointment-form .appointment-price-row {
  gap: 10px !important;
  padding: 9px 10px !important;
}
.technician-appointment-form .appointment-commercial-grid { margin-top: 8px !important; }
.technician-appointment-form .appointment-no-interval {
  min-height: 58px !important;
  padding: 9px 12px !important;
}
.technician-appointment-form .appointment-no-interval small {
  margin-top: 2px !important;
  font-size: 12px !important;
}
.technician-appointment-form .appointment-time-fields { gap: 10px 14px !important; }
.technician-appointment-form .appointment-time-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.technician-appointment-form .appointment-form-actions {
  margin-top: 2px !important;
  gap: 10px !important;
}
@media (min-width: 900px) {
  .technician-appointment-form [data-commercial-section="ridicare"],
  .technician-appointment-form [data-commercial-section="livrare"] { max-width: 640px; }
  .technician-appointment-form [data-commercial-section="reparatie"] .appointment-commercial-grid {
    grid-template-columns: minmax(220px, 340px) !important;
  }
}
@media (max-width: 720px) {
  .technician-form-panel { padding: 10px !important; }
  .technician-appointment-form .appointment-form-section { padding: 10px 12px 12px !important; }
}
/* === END PROGRAMARI COMPACT v1.0.0 === */

/* MOZY CALL STATS START */
.stats-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-summary-grid article {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 22px 22px 20px;
  border: 1px solid #d9e3f2;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  box-shadow: 0 10px 30px rgba(15,23,42,.055), 0 1px 2px rgba(15,23,42,.03);
}

.stats-summary-grid article::after {
  content: "";
  position: absolute;
  top: -42px;
  right: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(52,120,246,.075);
}

.stats-summary-grid article span {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.stats-summary-grid article strong {
  position: relative;
  z-index: 1;
  display: block;
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.035em;
}

.stats-period-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid #d9e3f2;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 12px 34px rgba(15,23,42,.05);
}

.stats-bars {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.stats-bar-row {
  display: grid;
  grid-template-columns: 112px minmax(220px,1fr) 42px minmax(210px,auto);
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .16s ease, transform .16s ease;
}

.stats-bar-row:hover {
  background: #f6f9ff;
  transform: translateY(-1px);
}

.stats-bar-date {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.stats-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eff8;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.06);
}

.stats-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fed 0%, #4f8cff 100%);
  box-shadow: 0 3px 10px rgba(52,120,246,.18);
}

.stats-bar-row > strong {
  color: #0f172a;
  font-size: 14px;
  text-align: right;
}

.stats-bar-row small {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.stats-period-panel + .panel {
  margin-top: 20px;
  border: 1px solid #d9e3f2;
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(15,23,42,.045);
}

.stats-period-panel + .panel .panel-title {
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef7;
}

.stats-period-panel + .panel table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.stats-period-panel + .panel thead th {
  padding: 13px 14px;
  background: #f7f9fc;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  border-bottom: 1px solid #e5ebf4;
}

.stats-period-panel + .panel tbody td {
  padding: 15px 14px;
  border-bottom: 1px solid #edf1f7;
  color: #334155;
}

.stats-period-panel + .panel tbody tr:last-child td {
  border-bottom: 0;
}

.stats-period-panel + .panel tbody tr:hover td {
  background: #f9fbff;
}

.page-heading .date-picker-form select {
  min-width: 150px;
  height: 42px;
  padding: 0 38px 0 13px;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}

.page-heading .date-picker-form select:focus {
  outline: none;
  border-color: #3478f6;
  box-shadow: 0 0 0 3px rgba(52,120,246,.12);
}

.dashboard-call-stats {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid #d9e3f2;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  box-shadow: 0 12px 34px rgba(15,23,42,.045);
}

.dashboard-call-stats .dashboard-library-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-bar-row {
    grid-template-columns: 100px 1fr 36px;
  }

  .stats-bar-row small {
    grid-column: 2 / -1;
  }

  .dashboard-call-stats .dashboard-library-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-summary-grid {
    grid-template-columns: 1fr;
  }

  .stats-summary-grid article {
    min-height: 108px;
  }

  .stats-bar-row {
    grid-template-columns: 82px 1fr 32px;
    gap: 10px;
    padding-inline: 4px;
  }

  .stats-bar-row small {
    grid-column: 1 / -1;
    padding-left: 92px;
    white-space: normal;
  }

  .stats-period-panel {
    padding: 18px;
  }

  .dashboard-call-stats .dashboard-library-metrics {
    grid-template-columns: 1fr 1fr;
  }
}
/* MOZY CALL STATS END */

/* MOZY VOUCHERS START */
.voucher-alert{margin:0 0 18px;padding:13px 16px;border-radius:12px;font-size:14px;font-weight:700}.voucher-alert.success{color:#166534;background:#ecfdf3;border:1px solid #bbf7d0}.voucher-alert.error{color:#991b1b;background:#fff1f2;border:1px solid #fecdd3}.voucher-panel,.voucher-form{border:1px solid #d9e3f2;border-radius:20px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 12px 34px rgba(15,23,42,.045)}.voucher-code{display:block;color:#0f172a;font-size:13px;letter-spacing:.03em}.voucher-phone,.voucher-sent-note{display:block;margin-top:4px;color:#64748b;font-size:11px}.voucher-benefit{max-width:320px}.voucher-status{display:inline-flex;min-width:72px;justify-content:center;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800;text-transform:capitalize}.voucher-status.activ{color:#166534;background:#dcfce7}.voucher-status.folosit{color:#334155;background:#e2e8f0}.voucher-status.expirat{color:#92400e;background:#fef3c7}.voucher-status.anulat{color:#991b1b;background:#fee2e2}.voucher-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.voucher-actions form{margin:0}.button.small{min-height:34px;padding:7px 10px;font-size:12px}.button.danger{background:#fff;color:#b42318;border:1px solid #f0c5c1}.voucher-form{max-width:980px}.voucher-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.voucher-form label{display:grid;gap:7px}.voucher-form label>span{color:#334155;font-size:13px;font-weight:800}.voucher-form input,.voucher-form select,.voucher-form textarea{width:100%;border:1px solid #cfd9e8;border-radius:11px;background:#fff;color:#0f172a;font:inherit;box-sizing:border-box}.voucher-form input,.voucher-form select{min-height:44px;padding:0 12px}.voucher-form textarea{min-height:92px;padding:11px 12px;resize:vertical}.voucher-form input:focus,.voucher-form select:focus,.voucher-form textarea:focus{outline:none;border-color:#3478f6;box-shadow:0 0 0 3px rgba(52,120,246,.11)}.voucher-full{grid-column:1/-1}.voucher-custom-date[hidden]{display:none!important}.voucher-money-input{display:grid;grid-template-columns:1fr auto;align-items:center;border:1px solid #cfd9e8;border-radius:11px;background:#fff;overflow:hidden}.voucher-money-input input{border:0;border-radius:0;box-shadow:none!important}.voucher-money-input b{padding:0 14px;color:#475569;font-size:13px}.voucher-form-footer{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-top:22px;padding-top:18px;border-top:1px solid #e7edf5}.voucher-form-footer small{color:#64748b}@media(max-width:760px){.voucher-form-grid{grid-template-columns:1fr}.voucher-full{grid-column:auto}.voucher-form-footer{align-items:stretch;flex-direction:column}.voucher-actions{min-width:240px}}
/* MOZY VOUCHERS END */

/* MOZY VOUCHER SEARCH START */
.voucher-panel-head{gap:20px;align-items:center}
.voucher-search{display:flex;gap:8px;align-items:center;margin-left:auto}
.voucher-search input{width:min(360px,36vw);min-width:230px;height:40px;padding:0 12px;border:1px solid #cfd9e8;border-radius:10px;background:#fff;color:#0f172a;font:inherit}
.voucher-search input:focus{outline:none;border-color:#3478f6;box-shadow:0 0 0 3px rgba(52,120,246,.1)}
@media(max-width:820px){.voucher-panel-head{align-items:stretch;flex-direction:column}.voucher-search{width:100%;margin-left:0;flex-wrap:wrap}.voucher-search input{width:100%;min-width:0}}
/* MOZY VOUCHER SEARCH END */

/* MOZY FIRMWARE LIBRARY START */

/* Layout general */
.firmware-page{
  max-width:1500px;
  margin:0 auto;
}

.firmware-page .page-heading{
  margin-bottom:22px;
}

.firmware-page .page-heading h1{
  margin:4px 0 6px;
  font-size:32px;
  line-height:1.15;
  letter-spacing:-.025em;
}

.firmware-page .page-heading p{
  margin:0;
  color:#66758a;
  font-size:14px;
}

.firmware-page .eyebrow{
  color:#2f6fea;
  font-size:11px;
  font-weight:900;
  letter-spacing:.09em;
}

/* Hero biblioteca */
.firmware-hero{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  margin-bottom:18px;
  padding:30px 32px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  color:#fff;
  background:
    radial-gradient(circle at 88% 12%,rgba(255,255,255,.10),transparent 11rem),
    linear-gradient(135deg,#0d1c34 0%,#162a48 68%,#1f4bb2 150%);
  box-shadow:0 20px 48px rgba(15,23,42,.13);
}

.firmware-hero::before{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  right:-105px;
  bottom:-165px;
  border-radius:50%;
  background:rgba(255,255,255,.05);
}

.firmware-hero > *{
  position:relative;
  z-index:1;
}

.firmware-hero .eyebrow{
  color:#a8c7ff;
}

.firmware-hero h1{
  margin:4px 0 7px;
  font-size:32px;
  letter-spacing:-.025em;
}

.firmware-hero p{
  max-width:760px;
  margin:0;
  color:#dce8fb;
  font-size:14px;
  line-height:1.6;
}

.firmware-add-btn{
  min-height:44px;
  padding:0 18px;
  border-radius:12px;
  box-shadow:0 10px 26px rgba(39,106,255,.28);
  white-space:nowrap;
}

/* Alerte */
.firmware-alert{
  margin:0 0 18px;
  padding:13px 16px;
  border-radius:13px;
  font-size:14px;
  font-weight:700;
}

.firmware-alert.success{
  color:#166534;
  background:#ecfdf3;
  border:1px solid #bbf7d0;
}

.firmware-alert.error{
  color:#991b1b;
  background:#fff1f2;
  border:1px solid #fecdd3;
}

/* Statistici */
.firmware-metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.firmware-metrics article{
  position:relative;
  overflow:hidden;
  min-height:94px;
  padding:18px 20px;
  border:1px solid #dbe4f0;
  border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 9px 28px rgba(15,23,42,.045);
}

.firmware-metrics article::after{
  content:"";
  position:absolute;
  right:-26px;
  top:-28px;
  width:92px;
  height:92px;
  border-radius:50%;
  background:#eef4ff;
}

.firmware-metrics span,
.firmware-metrics strong{
  position:relative;
  z-index:1;
}

.firmware-metrics span{
  display:block;
  margin-bottom:7px;
  color:#718096;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.firmware-metrics strong{
  display:block;
  color:#0f172a;
  font-size:26px;
  line-height:1;
  letter-spacing:-.035em;
}

/* Container listă */
.firmware-library-panel{
  padding:22px;
  border:1px solid #dbe4f0;
  border-radius:22px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 14px 36px rgba(15,23,42,.05);
}

.firmware-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}

.firmware-search{
  display:flex !important;
  flex:1;
  align-items:center;
  gap:8px;
  margin:0 !important;
}

.firmware-search-box{
  position:relative;
  flex:1;
  max-width:760px;
}

.firmware-search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#7c8ca3;
  font-size:18px;
  line-height:1;
  pointer-events:none;
}

.firmware-search input[type="search"]{
  display:block;
  width:100%;
  height:44px;
  padding:0 14px 0 42px;
  border:1px solid #cfd9e8;
  border-radius:12px;
  outline:none;
  background:#fff;
  color:#0f172a;
  font:inherit;
  transition:border-color .15s ease,box-shadow .15s ease;
}

.firmware-search input[type="search"]:focus{
  border-color:#4380ee;
  box-shadow:0 0 0 3px rgba(67,128,238,.11);
}

.firmware-count{
  color:#7a8799;
  font-size:12px;
  white-space:nowrap;
}

/* Carduri firmware */
.firmware-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.firmware-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:300px;
  padding:19px;
  border:1px solid #e0e8f2;
  border-radius:19px;
  background:#fff;
  box-shadow:0 7px 22px rgba(15,23,42,.045);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

.firmware-card:hover{
  transform:translateY(-2px);
  border-color:#cbdaf0;
  box-shadow:0 13px 30px rgba(15,23,42,.075);
}

.firmware-card-top{
  display:flex;
  align-items:flex-start;
  gap:13px;
}

.firmware-file-badge{
  display:grid;
  place-items:center;
  flex:0 0 50px;
  width:50px;
  height:50px;
  border:1px solid #d9e6fb;
  border-radius:14px;
  color:#215ecf;
  background:linear-gradient(180deg,#f2f7ff 0%,#eaf2ff 100%);
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
}

.firmware-card-main{
  min-width:0;
}

.firmware-brand{
  margin-bottom:4px;
  color:#2c6be6;
  font-size:11px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.firmware-card h2{
  margin:0;
  color:#101828;
  font-size:17px;
  line-height:1.3;
  letter-spacing:-.01em;
  overflow-wrap:anywhere;
}

.firmware-version{
  margin-top:6px;
  color:#708094;
  font-size:12px;
}

.firmware-file-name{
  margin-top:17px;
  padding:10px 11px;
  overflow:hidden;
  border:1px solid #edf1f6;
  border-radius:11px;
  background:#f8fafc;
  color:#3a4a5e;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11px;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.firmware-notes{
  margin:12px 0 0;
  color:#66758a;
  font-size:12.5px;
  line-height:1.55;
}

.firmware-meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:auto;
  padding-top:16px;
  color:#8b97a7;
  font-size:11px;
}

.firmware-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #edf1f6;
}

.firmware-actions form{
  margin:0;
}

.firmware-actions .button{
  min-height:34px;
  padding:7px 10px;
  border-radius:10px;
  font-size:12px;
}

.firmware-actions .button.danger{
  color:#b42318;
  background:#fff;
  border:1px solid #efc5c1;
}

/* Empty state */
.firmware-empty{
  padding:74px 20px;
  text-align:center;
}

.firmware-empty-icon{
  display:grid;
  place-items:center;
  width:64px;
  height:64px;
  margin:0 auto 15px;
  border:1px solid #dbe8ff;
  border-radius:19px;
  color:#2563eb;
  background:linear-gradient(180deg,#f2f7ff,#eaf2ff);
  font-weight:900;
  box-shadow:0 8px 24px rgba(37,99,235,.08);
}

.firmware-empty h2{
  margin:0 0 7px;
  color:#0f172a;
  font-size:20px;
}

.firmware-empty p{
  margin:0;
  color:#718096;
}

/* Formular upload / edit */
.firmware-upload-card{
  max-width:980px;
  padding:26px;
  border:1px solid #dbe4f0;
  border-radius:22px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 14px 36px rgba(15,23,42,.055);
}

.firmware-form-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:18px !important;
  align-items:start;
}

.firmware-form-grid > label{
  display:grid !important;
  gap:7px !important;
  min-width:0;
}

.firmware-form-grid > label > span{
  display:block;
  color:#344054;
  font-size:13px;
  font-weight:800;
}

.firmware-form-grid input[type="text"],
.firmware-form-grid textarea{
  display:block;
  width:100%;
  box-sizing:border-box;
  border:1px solid #cfd9e8;
  border-radius:12px;
  outline:none;
  background:#fff;
  color:#0f172a;
  font:inherit;
  transition:border-color .15s ease,box-shadow .15s ease;
}

.firmware-form-grid input[type="text"]{
  min-height:46px;
  padding:0 13px;
}

.firmware-form-grid textarea{
  min-height:106px;
  padding:12px 13px;
  resize:vertical;
}

.firmware-form-grid input[type="text"]:focus,
.firmware-form-grid textarea:focus{
  border-color:#4380ee;
  box-shadow:0 0 0 3px rgba(67,128,238,.11);
}

.firmware-full{
  grid-column:1 / -1 !important;
}

/* Drop zone upload */
.firmware-drop-zone{
  position:relative;
  display:grid !important;
  place-items:center;
  min-height:210px;
  padding:30px;
  border:2px dashed #b8cdec;
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 0%,rgba(76,132,236,.06),transparent 11rem),
    linear-gradient(180deg,#fbfdff 0%,#f5f9ff 100%);
  text-align:center;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,transform .16s ease;
}

.firmware-drop-zone:hover{
  transform:translateY(-1px);
  border-color:#6e9ff5;
  background:#f5f9ff;
}

.firmware-drop-zone input[type="file"]{
  position:absolute;
  inset:0;
  z-index:2;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}

.firmware-drop-icon{
  display:grid !important;
  place-items:center;
  width:50px;
  height:50px;
  border-radius:15px;
  color:#2563eb !important;
  background:#eaf2ff;
  font-size:25px !important;
  font-weight:600 !important;
}

.firmware-drop-zone strong{
  margin-top:2px;
  color:#0f172a;
  font-size:16px;
}

.firmware-drop-zone small{
  max-width:590px;
  color:#718096;
  font-size:12px;
  line-height:1.6;
}

.firmware-selected-file{
  position:relative;
  z-index:3;
  margin-top:6px;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
}

/* Progress */
.firmware-progress-wrap{
  margin-top:22px;
  padding:16px;
  border:1px solid #d8e5f7;
  border-radius:14px;
  background:#f8fbff;
}

.firmware-progress-wrap[hidden]{
  display:none !important;
}

.firmware-progress-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
  color:#344054;
  font-size:12px;
  font-weight:800;
}

.firmware-progress-track{
  height:11px;
  overflow:hidden;
  border-radius:999px;
  background:#e3ebf6;
}

.firmware-progress-bar{
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#2563eb,#4f8cff);
  transition:width .1s linear;
}

.firmware-progress-wrap > small{
  display:block;
  margin-top:8px;
  color:#718096;
}

/* Footer formular */
.firmware-upload-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #e6edf5;
}

.firmware-upload-footer small{
  max-width:660px;
  color:#718096;
  line-height:1.5;
}

.firmware-current-file{
  margin-bottom:20px;
  padding:14px 16px;
  border:1px solid #e2eaf4;
  border-radius:13px;
  background:#f7f9fc;
}

.firmware-current-file span{
  display:block;
  margin-bottom:4px;
  color:#718096;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.firmware-current-file strong{
  color:#0f172a;
  overflow-wrap:anywhere;
}

/* responsive */
@media(max-width:1200px){
  .firmware-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:800px){
  .firmware-hero{
    align-items:flex-start;
    flex-direction:column;
    padding:25px;
  }

  .firmware-metrics{
    grid-template-columns:1fr;
  }

  .firmware-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .firmware-search{
    align-items:stretch;
    flex-wrap:wrap;
  }

  .firmware-search-box{
    width:100%;
    max-width:none;
  }

  .firmware-grid{
    grid-template-columns:1fr;
  }

  .firmware-form-grid{
    grid-template-columns:1fr !important;
  }

  .firmware-full{
    grid-column:auto !important;
  }

  .firmware-upload-footer{
    align-items:stretch;
    flex-direction:column;
  }
}

/* MOZY FIRMWARE LIBRARY END */


/* === Mozy CRM DEMO === */
.demo-global-banner{
  position:sticky;
  top:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:38px;
  padding:8px 14px;
  background:#fff3cd;
  color:#664d03;
  border-bottom:1px solid #ffda6a;
  font-size:13px;
  text-align:center;
}
.demo-global-banner strong{
  padding:3px 8px;
  border-radius:999px;
  background:#664d03;
  color:#fff;
  letter-spacing:.04em;
}
@media(max-width:700px){
  .demo-global-banner{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
}


/* === WhatsApp conectabil per browser - DEMO === */
.demo-wa-card{
  margin:0 0 18px;
}
.demo-wa-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.demo-wa-heading h2{
  margin:0 0 6px;
}
.demo-wa-heading p{
  margin:0;
  max-width:780px;
}
.demo-wa-form{
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(180px,1fr);
  gap:12px;
  align-items:end;
}
.demo-wa-actions{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.demo-wa-status{
  margin-top:14px;
  padding:11px 13px;
  border-radius:10px;
  border:1px solid #d9e0e8;
  background:#f7f9fb;
}
.demo-wa-status.connected{
  border-color:#9fd5b0;
  background:#edf9f1;
}
.demo-wa-status.connecting{
  border-color:#ffd36b;
  background:#fff8e3;
}
.demo-wa-status.error{
  border-color:#efb0b0;
  background:#fff0f0;
}
.demo-wa-connect-grid{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin-top:16px;
}
.demo-wa-qr,
.demo-wa-pairing{
  min-width:220px;
  padding:14px;
  border:1px solid #d9e0e8;
  border-radius:12px;
  background:#fff;
}
.demo-wa-qr{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.demo-wa-qr img{
  display:block;
  width:min(260px,100%);
  aspect-ratio:1;
  object-fit:contain;
}
.demo-wa-pairing{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.demo-wa-pairing code{
  display:inline-block;
  font-size:24px;
  font-weight:800;
  letter-spacing:.12em;
  padding:10px 12px;
  border-radius:10px;
  background:#f5f7fa;
  word-break:break-all;
}
.demo-wa-note{
  margin:14px 0 0;
  color:#667085;
  font-size:13px;
}
@media(max-width:720px){
  .demo-wa-heading{
    flex-direction:column;
  }
  .demo-wa-form{
    grid-template-columns:1fr;
  }
}

/* === WhatsApp Demo polish v0.2.4 === */
.demo-wa-card{
  position:relative;
  overflow:hidden;
  margin:0 0 24px;
  padding:24px;
  border:1px solid #dbe4ee;
  border-radius:18px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.06), transparent 34%),
    linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 12px 34px rgba(15,23,42,.06);
}

.demo-wa-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,#2563eb 0%,#16a34a 100%);
}

.demo-wa-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px;
}

.demo-wa-heading h2{
  margin:0 0 7px;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.02em;
  color:#0f172a;
}

.demo-wa-heading p{
  margin:0;
  max-width:760px;
  color:#475569;
  line-height:1.55;
}

.demo-wa-heading .badge{
  flex:0 0 auto;
  min-height:auto;
  padding:7px 10px;
  border:1px solid #dbe4ee;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.demo-wa-form{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);
  gap:16px;
  align-items:end;
  max-width:860px;
}

.demo-wa-form label{
  display:grid;
  gap:7px;
  color:#334155;
  font-size:13px;
  font-weight:750;
}

.demo-wa-form input{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  border:1px solid #cbd5e1;
  border-radius:11px;
  padding:0 13px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  outline:none;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

.demo-wa-form input:hover{
  border-color:#94a3b8;
}

.demo-wa-form input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.demo-wa-actions{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  padding-top:2px;
}

.demo-wa-actions .button{
  min-height:42px;
  border-radius:10px;
  padding:0 15px;
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    background .14s ease,
    border-color .14s ease;
}

.demo-wa-actions .button:hover:not(:disabled){
  transform:translateY(-1px);
}

.demo-wa-actions .button.primary{
  box-shadow:0 7px 18px rgba(37,99,235,.18);
}

.demo-wa-actions .button.secondary{
  border:1px solid #d7dee8;
  background:#fff;
  color:#334155;
}

.demo-wa-actions .button.secondary:hover:not(:disabled){
  border-color:#b8c4d3;
  background:#f8fafc;
}

.demo-wa-actions .button.danger{
  border:1px solid #fecaca;
  background:#fff;
  color:#b42318;
}

.demo-wa-actions .button.danger:hover:not(:disabled){
  border-color:#fca5a5;
  background:#fff7f7;
}

.demo-wa-status{
  position:relative;
  margin-top:18px;
  padding:13px 15px 13px 42px;
  border:1px solid #dbe4ee;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  font-weight:650;
  line-height:1.45;
}

.demo-wa-status::before{
  content:"";
  position:absolute;
  left:15px;
  top:50%;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#94a3b8;
  transform:translateY(-50%);
  box-shadow:0 0 0 4px rgba(148,163,184,.14);
}

.demo-wa-status.connected{
  border-color:#b7e4c7;
  background:#f0fbf4;
  color:#166534;
}

.demo-wa-status.connected::before{
  background:#16a34a;
  box-shadow:0 0 0 4px rgba(22,163,74,.12);
}

.demo-wa-status.connecting{
  border-color:#fde68a;
  background:#fffbea;
  color:#92400e;
}

.demo-wa-status.connecting::before{
  background:#f59e0b;
  box-shadow:0 0 0 4px rgba(245,158,11,.14);
}

.demo-wa-status.error{
  border-color:#fecaca;
  background:#fff5f5;
  color:#b42318;
}

.demo-wa-status.error::before{
  background:#dc2626;
  box-shadow:0 0 0 4px rgba(220,38,38,.12);
}

.demo-wa-connect-grid{
  display:grid;
  grid-template-columns:minmax(240px,300px) minmax(280px,1fr);
  gap:16px;
  align-items:stretch;
  max-width:860px;
  margin-top:18px;
}

.demo-wa-qr,
.demo-wa-pairing{
  min-width:0;
  min-height:240px;
  box-sizing:border-box;
  padding:18px;
  border:1px solid #dbe4ee;
  border-radius:16px;
  background:#fff;
  box-shadow:0 4px 16px rgba(15,23,42,.04);
}

.demo-wa-qr strong,
.demo-wa-pairing strong{
  color:#0f172a;
  font-size:15px;
}

.demo-wa-qr{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  text-align:center;
}

.demo-wa-qr img{
  display:block;
  width:min(220px,100%);
  aspect-ratio:1;
  object-fit:contain;
  border-radius:12px;
  background:
    linear-gradient(45deg,#f8fafc 25%,transparent 25%) 0 0/12px 12px,
    linear-gradient(-45deg,#f8fafc 25%,transparent 25%) 0 6px/12px 12px,
    linear-gradient(45deg,transparent 75%,#f8fafc 75%) 6px -6px/12px 12px,
    linear-gradient(-45deg,transparent 75%,#f8fafc 75%) -6px 0/12px 12px;
}

.demo-wa-qr img:not([src]){
  display:none;
}

.demo-wa-pairing{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:12px;
}

.demo-wa-pairing code{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:62px;
  box-sizing:border-box;
  padding:12px 16px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  color:#0f172a;
  font-size:26px;
  font-weight:850;
  line-height:1;
  letter-spacing:.16em;
  text-align:center;
  word-break:break-all;
}

.demo-wa-pairing code:empty::before{
  content:"Codul apare aici";
  color:#94a3b8;
  font-size:13px;
  font-weight:650;
  letter-spacing:0;
}

.demo-wa-pairing small{
  display:block;
  color:#64748b;
  line-height:1.5;
}

.demo-wa-note{
  max-width:860px;
  margin:16px 0 0;
  padding-top:14px;
  border-top:1px solid #e8eef5;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}

@media(max-width:900px){
  .demo-wa-card{
    padding:20px;
  }

  .demo-wa-form{
    grid-template-columns:1fr 1fr;
  }

  .demo-wa-connect-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:720px){
  .demo-wa-card{
    padding:18px;
    border-radius:15px;
  }

  .demo-wa-heading{
    flex-direction:column;
    gap:12px;
  }

  .demo-wa-heading h2{
    font-size:22px;
  }

  .demo-wa-form{
    grid-template-columns:1fr;
  }

  .demo-wa-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .demo-wa-actions .button{
    width:100%;
  }

  .demo-wa-connect-grid{
    grid-template-columns:1fr;
  }

  .demo-wa-qr,
  .demo-wa-pairing{
    min-height:0;
  }

  .demo-wa-pairing code{
    font-size:22px;
    letter-spacing:.12em;
  }
}

@media(max-width:430px){
  .demo-wa-card{
    padding:16px;
  }

  .demo-wa-status{
    padding-left:39px;
  }

  .demo-wa-qr,
  .demo-wa-pairing{
    padding:15px;
  }
}
