:root {
  --ink: #261f1b;
  --muted: #645850;
  --line: rgba(38, 31, 27, 0.14);
  --paper: rgba(255, 255, 255, 0.92);
  --soft: #fff8ee;
  --green: #2f6f64;
  --green-soft: #dcefe9;
  --gold: #ffd9a0;
  --danger: #a32d2d;
  --shadow: 0 18px 60px rgba(38, 31, 27, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.94), rgba(232, 239, 221, 0.96)),
    url("/images/ui/inicio_fondo.png") center / cover fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--green);
  font-weight: 800;
}

button,
input,
select {
  font: inherit;
}

.page {
  width: min(1120px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

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

.brand-kicker,
.kicker {
  margin: 0 0 5px;
  color: #8a5b2d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(20px, 4vw, 28px);
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.copy {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.button,
button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.button.danger,
button.danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(14px, 3vw, 22px);
  align-items: start;
}

.setup-summary,
.form-panel,
.admin-card {
  padding: clamp(16px, 3vw, 24px);
}

.setup-summary {
  position: sticky;
  top: 18px;
}

.steps {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #4d433d;
  font-size: 14px;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(38, 31, 27, 0.18);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fffaf2;
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.message {
  margin: 0 0 14px;
  border-radius: 8px;
  padding: 12px 14px;
  color: #7a3520;
  background: var(--gold);
  font-weight: 800;
  line-height: 1.45;
}

.message.ok {
  color: var(--green);
  background: var(--green-soft);
}

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px -4px -4px;
  padding: 12px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--paper) 32%);
}

.auth-page {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(430px, 100%);
  padding: clamp(20px, 5vw, 32px);
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.stats {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.table-card {
  overflow: hidden;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.users {
  display: grid;
  border-top: 1px solid var(--line);
}

.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 150px 130px minmax(220px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.user-row.header {
  color: var(--muted);
  background: rgba(237, 241, 228, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-row strong,
.user-row small {
  display: block;
}

.user-row small {
  margin-top: 3px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 850;
}

.pill.suspended {
  color: #7a3520;
  background: #f2d6cc;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 880px) {
  body {
    background-attachment: scroll;
  }

  .topbar,
  .setup-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .setup-summary {
    position: static;
  }

  .field-grid,
  .user-form,
  .user-row {
    grid-template-columns: 1fr;
  }

  .user-row.header {
    display: none;
  }

  .form-actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 12px;
  }

  .setup-summary,
  .form-panel,
  .admin-card {
    padding: 16px;
  }

  .nav-actions,
  .form-actions,
  .inline-actions {
    display: grid;
  }

  .button,
  button {
    width: 100%;
  }
}

/* BasicFarm Admin v1.3.0 · estilo WordPress */
.bf-admin-page {
  background: #f0f0f1;
  color: #1d2327;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.bf-wp-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
}
.bf-wp-sidebar {
  background: #1d2327;
  color: #c3c4c7;
  min-height: 100dvh;
  position: sticky;
  top: 0;
  align-self: start;
}
.bf-wp-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px 14px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.bf-wp-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #72aee6;
  color: #0a4b78;
  font-weight: 900;
}
.bf-wp-brand strong,.bf-wp-brand small { display:block; }
.bf-wp-brand small { color:#a7aaad; font-size:12px; margin-top:2px; }
.bf-wp-menu { display: grid; padding: 8px 0; }
.bf-wp-menu a {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  color: #c3c4c7;
  text-decoration: none;
  font-weight: 500;
}
.bf-wp-menu a:hover,.bf-wp-menu a.active {
  color: #fff;
  background: #2c3338;
}
.bf-wp-menu a.active { border-left: 4px solid #72aee6; padding-left: 10px; }
.bf-wp-main { min-width: 0; }
.bf-wp-topbar {
  min-height: 64px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #c3c4c7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bf-wp-topbar h1 { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.25; }
.bf-wp-kicker { margin: 0 0 2px; color:#646970; font-size:12px; text-transform: uppercase; font-weight:700; letter-spacing:.04em; }
.bf-wp-user { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.bf-wp-user span { font-weight:700; }
.bf-wp-user small { color:#646970; }
.bf-wp-content { padding: 22px; display: grid; gap: 18px; }
.bf-wp-grid { display:grid; gap:14px; }
.bf-wp-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.bf-wp-card,.bf-wp-box {
  background: #fff;
  border: 1px solid #c3c4c7;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.bf-wp-card { padding: 16px; }
.bf-wp-card span.dashicons { font-size: 24px; }
.bf-wp-card p { margin: 8px 0 4px; color:#646970; }
.bf-wp-card strong { font-size: 26px; font-weight: 600; }
.bf-wp-box { padding: 18px; }
.bf-wp-box h2 { margin:0 0 10px; font-size:20px; font-weight:600; }
.bf-wp-box p { color:#3c434a; line-height:1.5; }
.bf-wp-box-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom: 12px; }
.bf-wp-box-head h2,.bf-wp-box-head p { margin:0; }
.bf-wp-chip,.bf-wp-status {
  display:inline-flex;
  align-items:center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}
.bf-wp-chip { background:#f0f6fc; color:#0a4b78; border:1px solid #c5d9ed; }
.bf-wp-status.active { background:#edfaef; color:#008a20; }
.bf-wp-status.inactive { background:#f6f7f7; color:#646970; }
.bf-wp-notice {
  border-left: 4px solid #72aee6;
  background:#fff;
  padding: 12px 14px;
  box-shadow:0 1px 1px rgba(0,0,0,.04);
}
.bf-wp-notice.success { border-left-color:#00a32a; }
.bf-wp-notice.error { border-left-color:#d63638; }
.bf-wp-button,
.bf-wp-row-actions button,
.bf-wp-upload button,
.bf-wp-form button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 32px;
  border: 1px solid #2271b1;
  border-radius: 3px;
  padding: 5px 12px;
  background:#f6f7f7;
  color:#2271b1;
  text-decoration:none;
  font-size: 13px;
  font-weight: 500;
  cursor:pointer;
}
.bf-wp-button.primary,
.bf-wp-upload button.primary,
.bf-wp-form button.primary { background:#2271b1; color:#fff; }
.bf-wp-row-actions button.danger { border-color:#d63638; color:#d63638; }
.bf-wp-actions,.bf-wp-row-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.bf-wp-list { margin:0; padding-left:18px; color:#3c434a; line-height:1.7; }
.bf-wp-upload,.bf-wp-form { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:12px; }
.bf-wp-form.grid-5 { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
.bf-wp-upload input[type=file],.bf-wp-form input,.bf-wp-form select,.bf-wp-table select {
  min-height: 32px;
  border:1px solid #8c8f94;
  border-radius:3px;
  background:#fff;
  color:#2c3338;
  padding:4px 8px;
}
.bf-wp-table-wrap { overflow:auto; border: 1px solid #c3c4c7; }
.bf-wp-table { width:100%; border-collapse:collapse; background:#fff; font-size:14px; }
.bf-wp-table th,.bf-wp-table td { padding:10px 12px; border-bottom:1px solid #c3c4c7; text-align:left; vertical-align:middle; }
.bf-wp-table th { background:#f6f7f7; font-weight:600; color:#1d2327; }
.bf-wp-table tr:hover td { background:#f6f7f7; }
.bf-wp-table p { margin:4px 0 6px; color:#646970; }
.bf-wp-table code,.bf-wp-box code { background:#f6f7f7; padding:2px 5px; border-radius:3px; color:#1d2327; }
.bf-wp-tabs { display:flex; gap:10px; margin-bottom:12px; }
.bf-wp-tabs a { color:#2271b1; text-decoration:none; }
.bf-wp-tabs a.active { color:#1d2327; font-weight:700; }
.bf-wp-defs { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; margin: 12px 0; }
.bf-wp-defs div { border:1px solid #dcdcde; background:#f6f7f7; padding:10px; }
.bf-wp-defs dt { color:#646970; font-size:12px; font-weight:700; text-transform:uppercase; }
.bf-wp-defs dd { margin:4px 0 0; font-weight:700; }
@media (max-width: 960px) {
  .bf-wp-shell { grid-template-columns: 1fr; }
  .bf-wp-sidebar { position: static; min-height:auto; }
  .bf-wp-menu { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .bf-wp-menu a.active { border-left:0; border-bottom:3px solid #72aee6; padding-left:14px; }
  .bf-wp-grid.four,.bf-wp-form.grid-5,.bf-wp-defs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bf-wp-topbar { display:grid; }
  .bf-wp-content { padding:12px; }
  .bf-wp-grid.four,.bf-wp-form.grid-5,.bf-wp-defs { grid-template-columns: 1fr; }
  .bf-wp-menu { grid-template-columns: 1fr 1fr; }
}
