/* =============================================================================
   Avi-Vest IFS · pages-daily.css
   Stiluri specifice paginilor de zi cu zi: Home, Precheck, Review, Record.
   Se încarcă după app.css. Fundația (tokens, carduri, KPI, tabele) stă în app.css.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   HOME — panou operator + dashboard supervisor
   -------------------------------------------------------------------------- */
.p-home .chart {
  height: 158px;
  gap: 5px;
}

.p-home .chart-col {
  gap: 5px;
}

.p-home .chart-bar {
  flex: 0 0 auto;
}

.p-home .chart-label {
  font-size: 10px;
}

.p-home .chart-value {
  font-size: 10.5px;
}

.p-home .kpi {
  min-height: 88px;
}

.p-home .empty {
  padding: 22px 18px;
}

.p-home .section-title .badge {
  text-transform: none;
  letter-spacing: 0;
}

/* Tabelele late rămân lizibile: derulează în card, nu storc coloanele. */
.p-home .table-wrap > .table {
  min-width: 560px;
}

@media (max-width: 600px) {
  .p-home .chart {
    height: 132px;
    gap: 3px;
  }

  .p-home .chart-label {
    font-size: 9px;
  }
}

/* -----------------------------------------------------------------------------
   PRECHECK — listă de verificări + coloană de progres
   -------------------------------------------------------------------------- */
.p-precheck .task {
  align-items: flex-start;
}

.p-precheck .task.is-err::before {
  background: var(--red-600);
}

.p-precheck .task.is-err .task-icon {
  background: var(--red-100);
  color: var(--red-700);
}

.p-precheck .task-actions {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.p-precheck .task-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.p-precheck .task-form .input {
  width: 214px;
}

.p-precheck .precheck-finalize {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.p-precheck .progress-legend {
  gap: 8px 16px;
}

.p-precheck .split-aside .card-title svg.ico {
  vertical-align: -2px;
}

@media (max-width: 760px) {
  .p-precheck .task-actions {
    align-items: stretch;
    width: 100%;
    margin-top: 4px;
  }

  .p-precheck .task-form {
    align-items: stretch;
  }

  .p-precheck .task-form .input {
    width: 100%;
  }

  .p-precheck .precheck-finalize {
    align-items: stretch;
    text-align: left;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .p-precheck .task {
    flex-wrap: wrap;
  }

  .p-precheck .task-main {
    flex-basis: calc(100% - 40px);
  }
}

/* -----------------------------------------------------------------------------
   REVIEW — coadă de verificare + respinse
   -------------------------------------------------------------------------- */
.p-review .review-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.p-review .review-row {
  position: relative;
}

.p-review .review-row.is-urgent {
  box-shadow: inset 3px 0 0 var(--red-600);
}

.p-review .review-row.is-urgent .list-title {
  color: var(--red-700);
}

.p-review .review-list .list-item {
  align-items: flex-start;
}

.p-review #rejected .card-head {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 600px) {
  .p-review .review-filter {
    align-items: flex-start;
  }

  .p-review .review-filter .segmented {
    max-width: 100%;
  }

  .p-review .list-item {
    flex-wrap: wrap;
  }

  .p-review .list-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* -----------------------------------------------------------------------------
   RECORD — fișa înregistrării, panouri pliabile, istoric
   -------------------------------------------------------------------------- */
.p-record .meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}

.p-record .meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.p-record .meta-label {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.p-record .meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.p-record .signature-banner {
  align-items: flex-start;
}

.p-record .signature-banner svg.ico {
  margin-top: 1px;
  color: var(--info-600);
}

.p-record .review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
}

.p-record .review-form .review-actions {
  padding-bottom: 2px;
}

.p-record .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.p-record .panel[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.p-record .panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.p-record .panel-summary::-webkit-details-marker {
  display: none;
}

.p-record .panel-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  flex: 0 0 auto;
}

.p-record .panel[open] .panel-summary::after {
  content: "−";
}

.p-record .panel-summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.p-record .panel-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}

.p-record .panel-title svg.ico {
  width: 16px;
  height: 16px;
  color: var(--green-600);
}

.p-record .panel-body {
  padding: 2px 16px 16px;
  border-top: 1px solid var(--line);
}

.p-record .panel-body > p:first-child {
  margin-top: 10px;
}

.p-record .checklist-table .group-row td {
  padding: 5px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.p-record .checklist-table .section-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.p-record .checklist-table .segmented {
  min-width: 168px;
}

.p-record .temps-table input[type="number"] {
  width: 112px;
}

.p-record .timeline-text {
  overflow-wrap: anywhere;
}

.p-record .new-record-form .callout {
  margin-top: 0;
}

@media (max-width: 900px) {
  .p-record .review-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-record .review-form .review-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .p-record .meta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .p-record .panel-summary {
    padding: 11px 13px;
  }

  .p-record .panel-body {
    padding: 2px 13px 13px;
  }

  .p-record .checklist-table .segmented {
    min-width: 0;
  }

  .p-record .review-form .review-actions {
    justify-content: stretch;
  }

  .p-record .review-form .review-actions .btn {
    flex: 1 1 auto;
  }
}
