/* ============================================================
   AUPHA PET SHOP — V38
   LANÇAMENTO RETROATIVO DO CADERNO
   ============================================================ */
.portal .section-action .aupha-v38-history-launcher {
  appearance: none;
  border: 1px solid rgba(252, 203, 26, .78);
  border-radius: 14px;
  padding: 11px 15px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ffe36a 0%, #fecb1a 58%, #f2b807 100%);
  color: #073c3d;
  box-shadow: 0 10px 24px rgba(137, 100, 0, .16), inset 0 1px 0 rgba(255,255,255,.55);
  font: 800 13.5px/1.15 Manrope, sans-serif;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.portal .section-action .aupha-v38-history-launcher:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 13px 28px rgba(137, 100, 0, .22), inset 0 1px 0 rgba(255,255,255,.65);
}
.portal .section-action .aupha-v38-history-launcher span { font-size: 18px; line-height: 1; }

.aupha-v38-modal-open { overflow: hidden; }
.aupha-v38-history-modal-wrap {
  z-index: 99999 !important;
  padding: 22px;
  overflow: auto;
  align-items: flex-start !important;
}
.aupha-v38-history-loading {
  margin: auto;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: #083e3e;
  text-align: center;
  font: 700 15px/1.5 Manrope, sans-serif;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
}
.aupha-v38-history-modal {
  width: min(820px, 100%);
  margin: auto;
  background: #fbfdfc;
  border: 1px solid rgba(8, 78, 77, .13);
  border-radius: 25px;
  box-shadow: 0 28px 90px rgba(0, 26, 26, .30);
  overflow: hidden;
  color: #173a39;
}
.aupha-v38-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 19px;
  background:
    radial-gradient(circle at 94% 0%, rgba(254,203,26,.22), transparent 32%),
    linear-gradient(135deg, #073f3e 0%, #0a5654 100%);
  color: #fff;
}
.aupha-v38-history-head .kicker {
  display: block;
  margin-bottom: 6px;
  color: #ffe374;
  font: 800 11px/1.2 Manrope, sans-serif;
  letter-spacing: .11em;
}
.aupha-v38-history-head h2 { margin: 0 0 5px; color: #fff; font-size: clamp(22px, 3vw, 28px); }
.aupha-v38-history-head p { margin: 0; max-width: 620px; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.5; }
.aupha-v38-history-head > button,
.aupha-v38-history-error-card > button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.aupha-v38-history-notice {
  margin: 19px 24px 0;
  padding: 14px 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(254,203,26,.48);
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbed, #fff8d8);
}
.aupha-v38-history-notice > span {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: #fecb1a;
  color: #063d3d;
  font-weight: 900;
  font-size: 19px;
}
.aupha-v38-history-notice strong { display: block; font: 800 14px/1.3 Manrope, sans-serif; color: #073f3e; }
.aupha-v38-history-notice p { margin: 3px 0 0; color: #526968; font-size: 13.5px; line-height: 1.48; }
.aupha-v38-history-counter {
  margin: 14px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(10,86,84,.12);
  border-radius: 13px;
  background: #f2f8f7;
  color: #4b6665;
  font-size: 13px;
}
.aupha-v38-history-counter strong {
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 10px;
  text-align: center;
  background: #0a5654;
  color: #fff;
  font: 800 14px/1 Manrope, sans-serif;
}
.aupha-v38-history-form { padding: 19px 24px 24px; }
.aupha-v38-history-form .form-grid { gap: 14px; }
.aupha-v38-history-form label {
  color: #254f4e;
  font: 750 13.5px/1.35 Manrope, sans-serif;
}
.aupha-v38-history-form input,
.aupha-v38-history-form select,
.aupha-v38-history-form textarea {
  margin-top: 7px;
  min-height: 45px;
  border: 1px solid rgba(8, 78, 77, .18);
  border-radius: 12px;
  background: #fff;
  color: #163f3e;
  font-size: 14.5px;
}
.aupha-v38-history-form textarea { min-height: 88px; resize: vertical; }
.aupha-v38-history-form input:focus,
.aupha-v38-history-form select:focus,
.aupha-v38-history-form textarea:focus {
  outline: 3px solid rgba(0,163,160,.13);
  border-color: #00a3a0;
}
.aupha-v38-history-status {
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}
.aupha-v38-history-status.success { background: #e9f8f2; border: 1px solid #b6e6d4; color: #176148; }
.aupha-v38-history-status.error { background: #fff0ed; border: 1px solid #f2c5bc; color: #963c2d; }
.aupha-v38-history-footer {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid rgba(8, 78, 77, .10);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.aupha-v38-save-next {
  border: 1px solid rgba(0,163,160,.34);
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 15px;
  background: #eaf8f7;
  color: #075b59;
  font: 800 13px/1.2 Manrope, sans-serif;
  cursor: pointer;
}
.aupha-v38-history-error-card { position: relative; padding: 28px; }
.aupha-v38-history-error-card > button { position: absolute; top: 14px; right: 14px; background: #0a5654; }
.aupha-v38-history-error-card strong { display: block; padding-right: 48px; color: #083f3e; font-size: 18px; }
.aupha-v38-history-error-card p { color: #5d6f6e; line-height: 1.5; }

@media (max-width: 760px) {
  .portal .section-action { gap: 10px; }
  .portal .section-action .aupha-v38-history-launcher { width: 100%; order: 3; min-height: 45px; }
  .aupha-v38-history-modal-wrap { padding: 10px; }
  .aupha-v38-history-modal { border-radius: 19px; }
  .aupha-v38-history-head { padding: 20px 17px 16px; }
  .aupha-v38-history-head p { font-size: 13.5px; }
  .aupha-v38-history-notice,
  .aupha-v38-history-counter { margin-left: 15px; margin-right: 15px; }
  .aupha-v38-history-form { padding: 17px 15px 18px; }
  .aupha-v38-history-form .form-grid { grid-template-columns: 1fr !important; }
  .aupha-v38-history-form .full { grid-column: auto !important; }
  .aupha-v38-history-footer { display: grid; grid-template-columns: 1fr; }
  .aupha-v38-history-footer button { width: 100%; min-height: 46px; }
}
