:root {
  --ink: #111111;
  --muted: #66645f;
  --soft: #f5f5f0;
  --panel: #ffffff;
  --line: #deded5;
  --yellow: #ffde00;
  --red: #ff1f1f;
  --green: #0a8f5a;
  --blue: #205db8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font: 14px/1.45 Inter, Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 7px;
  padding: 11px 15px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  transform: translateY(-1px);
}

.secondary {
  background: #e8e8df;
  color: var(--ink);
}

.danger {
  background: #ffe1de;
  color: #9d1b13;
}

.ghost-danger {
  border: 1px solid #f3b6af;
  background: #fff;
  color: #9d1b13;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.brand strong,
.brand-logo,
.hero-logo {
  font-family: "Yango Headline", Arial Black, Inter, sans-serif;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 22px 16px;
  background: #111;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-logo {
  color: var(--red);
  font-size: 28px;
  font-style: italic;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.brand small {
  display: block;
  color: #c9c9c3;
}

nav {
  display: grid;
  gap: 7px;
}

.nav-btn {
  width: 100%;
  background: transparent;
  color: #e7e7df;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  background: var(--red);
  color: #fff;
}

main {
  min-height: 100vh;
  margin-left: 238px;
}

body[data-mode="admin"] .driver-only {
  display: none;
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: end;
  min-height: 390px;
  padding: 42px 34px 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at 86% 24%, rgba(255, 31, 31, 0.2), transparent 28%),
    #fff;
  overflow: hidden;
}

.masthead::after {
  content: "ESTAMOS CONTIGO";
  position: absolute;
  right: -70px;
  top: 40px;
  color: rgba(255, 31, 31, 0.08);
  font-family: "Yango Headline", Arial Black, sans-serif;
  font-size: 92px;
  font-style: italic;
  font-weight: 950;
  transform: rotate(-6deg);
  animation: driftText 8s ease-in-out infinite alternate;
}

.masthead-copy,
.support-visual {
  position: relative;
  z-index: 1;
}

.hero-logo {
  color: var(--red);
  font-size: clamp(54px, 8vw, 112px);
  font-style: italic;
  font-weight: 950;
  line-height: 0.82;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.masthead h1 {
  max-width: 780px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.masthead p {
  max-width: 690px;
  margin-top: 14px;
  color: #4f4f4f;
  font-size: 17px;
}

.support-visual {
  min-height: 260px;
}

.heart-badge {
  position: absolute;
  left: 22px;
  top: -18px;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
  animation: floatBadge 3.8s ease-in-out infinite;
  z-index: 2;
}

.support-card {
  display: grid;
  gap: 10px;
  border-radius: 8px;
  padding: 86px 24px 24px;
  min-height: 250px;
  color: #fff;
  box-shadow: 0 24px 60px rgba(255, 31, 31, 0.22);
  animation: cardLift 4.6s ease-in-out infinite;
}

.red-card {
  background: var(--red);
}

.support-card strong {
  color: #fff;
  font-family: "Yango Headline", Arial Black, sans-serif;
  font-size: 34px;
  line-height: 0.95;
  text-transform: uppercase;
}

.support-card span {
  color: #fff;
  font-size: 15px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 15px 34px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.workbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.workbar p,
.panel p,
.section-title p,
.field-help,
small {
  color: var(--muted);
}

.view {
  display: none;
  padding: 24px 34px 40px;
}

.view.active {
  display: block;
}

.panel,
.request-card,
.metrics > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.form-panel {
  max-width: 980px;
}

.section-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 4px 0 16px;
}

.section-title + .form-grid {
  margin-bottom: 24px;
}

.section-title span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}

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

.field-help {
  font-size: 13px;
  font-weight: 500;
}

.terms-consent {
  display: grid;
  gap: 10px;
  margin: 8px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
}

.terms-check input {
  width: auto;
  margin-top: 3px;
}

.link-button {
  justify-self: start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  text-decoration: underline;
}

.actions,
.table-actions,
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.waiting-panel,
.approved-panel,
.rejected-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 860px;
  padding: 42px 24px;
  text-align: center;
}

.waiting-panel h2,
.approved-panel h2,
.rejected-panel h2 {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  text-transform: uppercase;
}

.loader-ring {
  width: 82px;
  height: 82px;
  border: 8px solid #f2f2ec;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.giant-check {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 104px;
  font-weight: 950;
  line-height: 1;
  animation: pop 0.36s ease-out;
}

.promo-code {
  width: min(100%, 720px);
  border: 4px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  background: var(--yellow);
  color: var(--ink);
  font-family: "Yango Headline", Arial Black, sans-serif;
  font-size: clamp(34px, 6vw, 76px);
  font-style: italic;
  font-weight: 950;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.fine-print {
  max-width: 620px;
}

.auth-panel {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.protected-content {
  display: none;
}

.protected-content.unlocked {
  display: block;
}

.hidden,
.auth-panel.hidden {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics > div {
  padding: 16px;
}

.metrics span {
  display: block;
  color: var(--red);
  font-size: 30px;
  font-weight: 950;
}

.table-actions {
  justify-content: flex-end;
  margin: 0 0 18px;
}

.table-actions select {
  max-width: 230px;
  margin-right: auto;
}

.request-grid {
  display: grid;
  gap: 12px;
}

.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 18px;
  padding: 16px;
}

.case-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.case-code {
  color: var(--muted);
  font-weight: 850;
}

.case-title {
  font-size: 18px;
  font-weight: 850;
}

.case-meta,
.evidence-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 11px 0;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.pill {
  background: #eeeee8;
  color: #333;
}

.status-pending {
  background: #fff4b8;
  color: #5f4b00;
}

.status-approved {
  background: #e9f7ef;
  color: var(--green);
}

.status-rejected {
  background: #ffe1de;
  color: #9d1b13;
}

.proof-link {
  border-radius: 7px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

button.proof-link {
  display: inline-flex;
  align-items: center;
}

.review-box {
  display: grid;
  gap: 10px;
  align-content: start;
}

.amount-note {
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff5bf;
  color: #4f3d00;
  font-weight: 850;
}

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

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.58);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.28);
}

.modal-head {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: -16px -16px 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.terms-box {
  display: grid;
  gap: 12px;
  max-height: min(76vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.proof-box {
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.proof-content {
  display: grid;
  place-items: center;
  min-height: 320px;
  max-height: calc(88vh - 92px);
  overflow: auto;
  background: #f3f3ee;
}

.proof-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.proof-content iframe {
  width: 100%;
  height: min(72vh, 680px);
  border: 0;
  background: #fff;
}

.terms-box h3 {
  font-size: 18px;
}

.terms-box p {
  color: #3e3e3e;
  font-size: 13px;
}

.icon-close {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatBadge {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(-4deg);
  }
}

@keyframes cardLift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes driftText {
  from {
    transform: translateX(0) rotate(-6deg);
  }
  to {
    transform: translateX(-28px) rotate(-6deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
  }

  .brand {
    margin-bottom: 14px;
  }

  nav {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .nav-btn {
    min-height: 44px;
    text-align: center;
  }

  main {
    margin-left: 0;
  }

  .masthead {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: auto;
    padding: 28px 22px 24px;
  }

  .masthead::after {
    display: none;
  }

  .hero-logo {
    margin-bottom: 14px;
    font-size: 58px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .masthead h1 {
    font-size: 42px;
    line-height: 0.98;
  }

  .masthead p {
    margin-top: 12px;
    font-size: 16px;
  }

  .support-visual {
    display: grid;
    gap: 10px;
    min-height: auto;
  }

  .heart-badge {
    position: static;
    justify-self: start;
    min-height: 34px;
    padding: 0 14px;
    font-size: 12px;
    animation: none;
  }

  .support-card {
    min-height: 170px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(255, 31, 31, 0.18);
    animation: none;
  }

  .support-card strong {
    font-size: 30px;
  }

  .workbar,
  .auth-form,
  .table-actions {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .view,
  .workbar,
  .status-strip {
    padding-left: 20px;
    padding-right: 20px;
  }

  .status-strip {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .workbar {
    gap: 8px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .workbar h2 {
    font-size: 24px;
  }

  .view {
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .panel {
    padding: 16px;
  }

  .form-grid,
  .request-card {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
  }

  .actions button {
    width: 100%;
  }

  .waiting-panel,
  .approved-panel,
  .rejected-panel {
    padding: 30px 18px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  .sidebar {
    padding: 14px 16px;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo {
    font-size: 24px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand small {
    font-size: 12px;
  }

  .masthead {
    padding: 24px 16px 22px;
  }

  .hero-logo {
    font-size: 48px;
  }

  .masthead h1 {
    font-size: 31px;
  }

  .masthead p {
    font-size: 15px;
  }

  .support-card {
    min-height: 138px;
    padding: 20px;
  }

  .support-card strong {
    font-size: 25px;
  }

  .support-card span {
    font-size: 14px;
  }

  .view,
  .workbar,
  .status-strip {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-title {
    gap: 10px;
  }

  .section-title span {
    width: 30px;
    height: 30px;
  }

  input,
  select,
  textarea,
  button {
    min-height: 44px;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: 88vh;
  }

  .terms-box {
    max-height: 88vh;
  }

  .promo-code {
    font-size: 34px;
    padding: 14px;
  }
}
