/* FBOS Flota — Vertical overrides ONLY
   Objetivo: NO pisar el estilo global (/styles.css).
   Aquí solo van estilos específicos de Flota.
*/

/* ----------------------------
   Header / Tabs (premium)
-----------------------------*/

.header-block {
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 2px 2px 0;
}

.logo-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid #d9e2ec;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: block;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.3;
  font-weight: 500;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.tab {
  flex: 1;
  text-align: center;
  padding: 11px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  transition: all 0.2s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: #e2e8f0;
}

.tab.active {
  background: #ffffff;
  color: #0a2540;
  border-color: #dbe4ee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.06);
}

.coach-autocomplete {
  position: relative;
}

.coach-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.coach-suggestion {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  box-shadow: none;
}

.coach-suggestion:hover,
.coach-suggestion:focus {
  background: #e8f0f8;
  border-color: #c9d8e8;
  transform: none;
  box-shadow: none;
}

.coach-suggestion span {
  font-size: 14px;
  font-weight: 750;
}

.coach-suggestion small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.coach-selected-hint {
  margin: 7px 0 0;
}

.coach-selected-hint-active {
  color: #0a7c3a;
}

.weekly-report-section {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e7edf4;
  border-radius: 14px;
  background: #ffffff;
}

.report-period-section {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e7edf4;
  border-radius: 14px;
  background: #ffffff;
}

.report-period-head {
  display: grid;
  gap: 10px;
}

.report-period-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.report-period-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #e3eaf1;
  border-radius: 12px;
  background: #f9fbfd;
}

.report-period-select {
  display: grid;
  gap: 6px;
}

.report-period-select span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.report-period-card strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.report-period-hint {
  margin: 0;
}

.weekly-report-head {
  display: grid;
  gap: 10px;
}

.section-eyebrow {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weekly-report-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.weekly-total-card {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #e3eaf1;
  border-radius: 12px;
  background: #f9fbfd;
}

.weekly-total-card span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.weekly-total-card strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.weekly-report-hint {
  margin: 0;
}

.weekly-days {
  display: grid;
  gap: 6px;
}

.weekly-day {
  display: grid;
  gap: 0;
  min-height: 44px;
  padding: 0;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #ffffff;
  opacity: 1;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.weekly-day-active {
  border-color: #d3dce6;
  background: #fbfcfe;
}

.weekly-day-open {
  transform: none;
}

.weekly-day-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px 10px 12px;
  padding-right: 18px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.weekly-day-toggle::after {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  content: "▾";
}

.weekly-day-active .weekly-day-toggle::after {
  color: #64748b;
  content: "•";
}

.weekly-day-active:not(.weekly-day-open) .weekly-day-toggle::after {
  color: #0f172a;
  content: "•";
}

.weekly-day-open .weekly-day-toggle::after {
  color: #475569;
  content: "▴";
}

.weekly-day-toggle input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
}

.weekly-day-toggle > span {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1;
}

.weekly-day-fields {
  display: none;
  gap: 10px;
  margin: 0 12px 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}

.weekly-day-open .weekly-day-fields {
  display: grid;
}

.weekly-day-breakdown {
  display: none;
  gap: 6px;
  margin: 0 12px 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.weekly-day-open .weekly-day-breakdown {
  display: grid;
}

.weekly-day-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.weekly-day-breakdown strong {
  color: #0a3d62;
}

.weekly-options-row {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.weekly-video-analysis,
.weekly-no-show-toggle {
  display: grid;
  gap: 8px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid #edf2f7;
  border-radius: 0;
  background: transparent;
}

.weekly-no-show-toggle {
  border-top-color: #f3e7c8;
}

.weekly-day-no-show .weekly-day-breakdown {
  color: #7c5b12;
}

.weekly-option-toggle,
.weekly-video-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.weekly-option-toggle input[type="checkbox"],
.weekly-video-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
}

.weekly-video-group {
  display: grid;
  gap: 6px;
}

.weekly-day-fields label {
  display: grid;
  gap: 6px;
}

.weekly-day-fields span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.weekly-day-fields select:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.weekly-day-total {
  display: none;
  margin: 0 12px 12px;
  padding-top: 8px;
  border-top: 1px solid #e6edf5;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.weekly-day-open .weekly-day-total {
  display: block;
}

.weekly-day-total strong {
  color: #0f172a;
}

.weekly-day-summary {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding-right: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}

.weekly-day-active .weekly-day-summary {
  display: flex;
}

.weekly-day-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-day-summary strong {
  flex: 0 0 auto;
  color: #0a3d62;
  text-align: right;
}

.weekly-report-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 700;
}

.weekly-summary-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e7edf4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.payment-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #f8fafc;
}

.payment-breakdown > div,
.payment-detail-card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.payment-breakdown-total,
.payment-detail-total {
  padding-top: 8px;
  border-top: 1px solid #dbe4ee;
  color: #0a3d62;
}

.payment-detail-card {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #f8fafc;
}

.action-payment-summary {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.action-payment-summary span:last-child {
  color: #0a3d62;
}

.weekly-summary-bar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weekly-summary-bar strong {
  color: #0a3d62;
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.weekly-summary-bar small {
  grid-column: 1 / -1;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

/* ----------------------------
   Vehículo — preview/verificación
-----------------------------*/

.vehicle-preview {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  display: none;
}

.vehicle-preview h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.8;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.readonly-field label {
  display: block;
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 4px;
}

.readonly-field input {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #f7f7f7;
}

@media (min-width: 560px) {
  .vehicle-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hint {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
}

/* ----------------------------
   Ajustes del form
-----------------------------*/

.container form input,
.container form select,
.container form textarea {
  display: block;
  margin: 10px 0 0;
}

.container form label {
  display: block;
  margin-top: 14px;
}

.container form .weekly-day-toggle {
  display: flex;
  align-items: center;
  margin-top: 0;
}

.container form .weekly-day-toggle input[type="checkbox"] {
  display: inline-block;
  margin: 0;
}

.container form .weekly-option-toggle,
.container form .weekly-video-toggle {
  display: flex;
  align-items: center;
  margin-top: 0;
}

.container form .weekly-option-toggle input[type="checkbox"],
.container form .weekly-video-toggle input[type="checkbox"] {
  display: inline-block;
  margin: 0;
}

.container form .hint,
.container form small {
  display: block;
  margin-top: 8px;
}

.container form h2 {
  margin-top: 22px;
  margin-bottom: 10px;
}

.container form button,
.container form .btn {
  margin-top: 16px;
}

/* ----------------------------
   Confirmación estilo Stripe / Ding Repairs
-----------------------------*/

.confirm-card {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.confirm-card:hover {
  border-color: #b9c3cf;
  background: #ffffff;
}

.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.confirm-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.confirm-box {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid #c7d0d9;
  border-radius: 6px;
  background: #fff;
  flex: 0 0 20px;
  position: relative;
  transition: all 0.2s ease;
}

.confirm-text {
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}

.confirm-check input:checked + .confirm-box {
  background: #0a2540;
  border-color: #0a2540;
}

.confirm-check input:checked + .confirm-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.confirm-check input:focus + .confirm-box {
  box-shadow: 0 0 0 4px rgba(10, 37, 64, 0.12);
}

/* ----------------------------
   Evidencia visual — multi preview
-----------------------------*/

.evidence-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.evidence-preview-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #ffffff;
}

.evidence-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.evidence-preview-remove:hover {
  border-color: rgba(15, 23, 42, 0.24);
  background: #ffffff;
}

.evidence-preview-media-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
}

.evidence-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.evidence-preview-file {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.evidence-preview-meta {
  font-size: 11px;
  line-height: 1.3;
  color: #64748b;
}

@media (min-width: 640px) {
  .evidence-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .page .container {
    max-width: 1120px;
  }

  .header-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
  }

  .brand {
    margin-bottom: 0;
  }

  .tabs {
    width: auto;
    min-width: 360px;
  }

  .card {
    padding: 24px 28px;
  }

  #surfForm {
    max-width: 860px;
  }
}

/* Surf Synergy specific additions */
.flow-board {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable both-edges;
}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.flow-column {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.flow-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.flow-column-head h3 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
}

.flow-column-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.csv-export-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.csv-export-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.flow-column-body {
  padding: 14px;
  display: grid;
  gap: 16px;
  align-items: start;
}

.action-card {
  cursor: pointer;
  display: grid;
  gap: 12px;
  margin: 0 0 4px;
  padding: 16px;
  border: 1px solid #d7e1ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.action-card:hover {
  border-color: #b8c9da;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.action-card-main {
  display: grid;
  gap: 10px;
}

.action-card-content {
  display: grid;
  gap: 7px;
}

.action-card-content p,
.action-card-footer p {
  margin: 0;
}

.report-preview-block,
.report-detail-block {
  display: grid;
  gap: 7px;
}

.report-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #0f172a;
  line-height: 1.55;
}

.report-text-preview {
  max-height: 168px;
  overflow: hidden;
  padding: 10px 11px;
  border: 1px solid #e6edf5;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
}

.report-text-detail {
  max-height: 56vh;
  overflow: auto;
  padding: 13px;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  font-size: 14px;
}

.action-card-footer {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e6edf5;
}

.action-review-btn {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.action-header-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.chip-state {
  background: #e8f0f8;
  border-color: #d3deeb;
}

.chip-success {
  background: #ecfdf3;
  border-color: #b7ebcc;
  color: #0a7c3a;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  padding: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-body {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.modal-actions {
  margin-top: 12px;
}

.field-block-price {
  display: grid;
  gap: 10px;
}

.field-block-price-compact {
  gap: 8px;
  padding: 0;
}

.field-block-price-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.field-block-price-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-block-price-context {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.field-block-price-context strong {
  color: #0f172a;
  font-size: 13px;
}

.field-block-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.field-block-price-input {
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-block-price-input .label {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.currency-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.currency-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 34px;
  padding: 0 10px;
  border-right: 1px solid #edf2f7;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.currency-input .input {
  height: 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: 10px;
}

.currency-input .input:focus {
  box-shadow: none;
}

.field-block-price-row .btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.field-block-price-row .btn.btn-ghost {
  background: #f8fafc;
}

.field-block-price-row .btn.btn-ghost:hover {
  background: #eef2f7;
}

.price-save-hint {
  margin: 0;
}

.btn-inline-small {
  align-self: end;
}

.confirm-modal {
  z-index: 70;
}

.confirm-card-modal {
  width: min(460px, 100%);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
}

.confirm-message {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.btn-ghost {
  border: 1px solid #dbe4ee;
  background: #f8fafc;
  color: #334155;
}

.btn-danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #ffe4e6;
}

.field-block {
  display: grid;
  gap: 6px;
}

.field-block .label {
  margin-top: 0;
}

.comments-panel {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.comments-panel h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
}

.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 14px;
}

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

.comment-meta {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.history-grid {
  display: grid;
  gap: 18px;
}

.history-toolbar {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.history-toolbar .label {
  margin-top: 0;
}

.history-search-row {
  display: grid;
  gap: 10px;
}

.history-search-row .btn {
  margin-top: 0;
  min-height: 48px;
}

.history-results-meta {
  padding-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.history-card {
  cursor: pointer;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d7e1ec;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.history-card:hover {
  border-color: #b8c9da;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.history-card:focus-visible {
  outline: 3px solid rgba(10, 61, 98, 0.22);
  outline-offset: 3px;
}

.history-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6edf5;
}

.history-card-head > div {
  display: grid;
  gap: 3px;
}

.history-card-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-card-head strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.15;
}

.history-card-main {
  display: grid;
  gap: 10px;
}

.history-card-main p {
  margin: 0;
}

.history-field {
  display: grid;
  gap: 2px;
}

.history-field span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-field strong {
  color: #0f172a;
  font-size: 14px;
}

.history-payment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #f8fafc;
}

.history-payment-grid span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.history-payment-grid strong {
  color: #0f172a;
}

.report-text-history {
  padding: 13px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow: visible;
}

.history-weekly-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #ffffff;
}

.history-weekly-summary span {
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.history-empty-state {
  display: grid;
  gap: 6px;
  text-align: center;
}

.canvas-notice {
  position: sticky;
  top: 12px;
  z-index: 35;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #a7d7bd;
  border-radius: 14px;
  background: #effcf4;
  box-shadow: 0 12px 30px rgba(15, 118, 67, 0.12);
  color: #116139;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.canvas-notice-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.report-success-card {
  width: min(620px, 100%);
  padding: 20px;
}

.report-success-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.report-success-label {
  display: block;
  margin-bottom: 4px;
  color: #0a7c3a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-success-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 20px;
}

.report-success-close {
  width: auto;
  margin: 0;
  padding: 9px 12px;
}

.report-success-body {
  display: grid;
  gap: 14px;
  padding: 16px 0 4px;
}

.report-success-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b7ebcc;
  border-radius: 14px;
  background: #ecfdf3;
}

.report-success-ticket span,
.report-success-field span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-success-ticket strong {
  color: #116139;
  font-size: 20px;
}

.report-success-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.report-success-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-success-field strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 14px;
}

.report-success-report {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.report-success-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #0a7c3a;
  font-size: 13px;
  font-weight: 700;
}

.report-success-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

.report-success-actions .btn {
  margin: 0;
}

@media (min-width: 760px) {
  .report-success-grid,
  .report-success-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-period-head {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .weekly-report-head {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .weekly-total-card {
    min-width: 180px;
  }

  .history-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

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

  .history-payment-grid span {
    display: grid;
    gap: 2px;
  }

  .weekly-day-fields {
    grid-template-columns: 1.4fr 1fr 0.8fr;
  }

  .weekly-video-analysis {
    grid-column: 1 / -1;
  }

  .weekly-options-row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .field-block-price-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .weekly-video-analysis {
    grid-column: auto;
  }

  .confirm-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 759px) {
  .field-block-price-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .field-block-price-row .btn {
    justify-self: start;
  }
}

@media (min-width: 980px) {
  .flow-board {
    margin-right: 0;
    padding-bottom: 10px;
  }

  .flow-grid {
    display: flex;
    gap: 16px;
    min-width: max-content;
    align-items: stretch;
  }

  .flow-column {
    flex: 0 0 300px;
    min-width: 300px;
    max-width: 300px;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
  }

  .flow-column-head {
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .flow-column-body {
    flex: 1 1 auto;
    max-height: calc(100vh - 330px);
    overflow: auto;
    overscroll-behavior: contain;
  }
}

@media (min-width: 1280px) {
  .flow-column {
    flex-basis: 320px;
    min-width: 320px;
    max-width: 320px;
  }
}
