:root {
  --bg: #d8cfad;
  --bg-soft: #e3d9b9;
  --panel: rgba(245, 239, 216, 0.92);
  --panel-strong: #efe6c9;
  --border: rgba(34, 52, 58, 0.14);

  --text: #1f2f35;
  --muted: #5e6d6f;

  --accent: #5f9fbd;      /* celeste vintage */
  --accent-2: #d48d0f;    /* mostaza */
  --accent-3: #d5141d;    /* rojo profundo */
  --olive: #587245;       /* verde oliva */
  --ink: #3f7f93;         /* azul petróleo */
  --success: #587245;
  --danger: #b62329;

  --shadow: 0 18px 40px rgba(34, 45, 38, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 116px,
      var(--olive) 116px,
      var(--olive) 156px,
      var(--accent) 156px,
      var(--accent) 196px,
      var(--accent-2) 196px,
      var(--accent-2) 236px,
      var(--accent-3) 236px,
      var(--accent-3) 276px,
      transparent 276px
    ),
    var(--bg);
}

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

a:hover {
  opacity: 0.84;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ---------- TOPBAR ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(34, 52, 58, 0.10);
  box-shadow: var(--shadow);
}

.brand-text .title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
}

.brand-text .subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- BUTTONS ---------- */

.nav a,
button,
.button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 800;
  background: var(--ink);
  color: #f9f4e5;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.nav a:hover,
button:hover,
.button:hover {
  transform: translateY(-1px);
}

.nav a.secondary,
button.secondary,
.button.secondary {
  background: rgba(255, 255, 255, 0.32);
  color: var(--text);
  border: 1px solid rgba(34, 52, 58, 0.12);
  box-shadow: none;
}

button.secondary:hover,
.nav a.secondary:hover,
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.46);
}

/* ---------- CARDS ---------- */

.card {
  background: var(--panel);
  border: 1px solid rgba(34, 52, 58, 0.10);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(6px);
}

.card + .card {
  margin-top: 18px;
}

.card-title {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 900;
  color: var(--text);
}

/* ---------- LAYOUT ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy h2 {
  font-size: 34px;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--text);
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border-radius: 24px;
  background:
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 34%,
      rgba(88, 114, 69, 0.95) 34%,
      rgba(88, 114, 69, 0.95) 45%,
      rgba(95, 159, 189, 0.95) 45%,
      rgba(95, 159, 189, 0.95) 56%,
      rgba(212, 141, 15, 0.95) 56%,
      rgba(212, 141, 15, 0.95) 67%,
      rgba(213, 20, 29, 0.95) 67%,
      rgba(213, 20, 29, 0.95) 78%,
      transparent 78%
    ),
    rgba(255,255,255,0.14);
  border: 1px solid rgba(34, 52, 58, 0.12);
  overflow: hidden;
}

.logo-panel img {
  max-width: 88%;
  max-height: 180px;
  object-fit: contain;
}

/* ---------- GRID ---------- */

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

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

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

/* ---------- FORMS ---------- */

label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(34, 52, 58, 0.12);
  background: rgba(255, 251, 239, 0.96);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 15px;
  outline: none;
  transition: 0.18s ease;
  margin-bottom: 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(95, 159, 189, 0.18);
}

textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.55;
}

/* ---------- DROPZONE ---------- */

.dropzone {
  border: 2px dashed rgba(63, 127, 147, 0.45);
  background: rgba(255, 250, 238, 0.55);
  border-radius: 24px;
  padding: 42px 24px;
  text-align: center;
  transition: 0.2s ease;
  cursor: pointer;
  margin-bottom: 18px;
}

.dropzone.dragover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: rgba(95, 159, 189, 0.10);
}

input[type="file"] {
  display: none;
}

/* ---------- TEXT ---------- */

.muted {
  color: var(--muted);
}

.text-original {
  border-left: 5px solid var(--accent);
}

.text-final {
  border-left: 5px solid var(--success);
}

pre.original-text {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 251, 239, 0.96);
  border: 1px solid rgba(34, 52, 58, 0.10);
  color: var(--text);
}

/* ---------- AUDIO ---------- */

.audio-box {
  background: rgba(255, 250, 238, 0.58);
  border: 1px solid rgba(34, 52, 58, 0.10);
  border-radius: 18px;
  padding: 18px;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.audio-controls button {
  padding: 10px 14px;
  border-radius: 999px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-row input[type="range"] {
  flex: 1;
  margin-bottom: 0;
  accent-color: var(--ink);
}

.time-label {
  min-width: 110px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- TABLE ---------- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  background: rgba(255, 250, 238, 0.34);
  border-radius: 16px;
  overflow: hidden;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(34, 52, 58, 0.08);
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.24);
}

tbody tr:hover {
  background: rgba(95, 159, 189, 0.06);
}

/* ---------- BADGES ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.badge-ok {
  background: rgba(88, 114, 69, 0.14);
  color: #405533;
}

.badge-error {
  background: rgba(182, 35, 41, 0.12);
  color: #8e1d23;
}

/* ---------- ACTIONS ---------- */

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- ALERTS ---------- */

.notice {
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
}

.notice.error {
  background: rgba(182, 35, 41, 0.10);
  color: #7f1d23;
  border: 1px solid rgba(182, 35, 41, 0.18);
}

.notice.success {
  background: rgba(88, 114, 69, 0.12);
  color: #405533;
  border: 1px solid rgba(88, 114, 69, 0.18);
}

/* ---------- LOGIN ---------- */

.login-shell {
  max-width: 460px;
  margin: 80px auto;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .hero,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 18px 14px 40px;
  }

  .brand-text .title {
    font-size: 24px;
  }

  .topbar {
    align-items: flex-start;
  }
}