:root {
  --brand-900: #1e3a8a;
  --brand-800: #1d4ed8;
  --brand-700: #2563eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --soft: #f5f7fb;
  --surface-soft: #f5f7fb;
  --icon-soft: #e0f2fe;
  --border: #e2e8f0;
  --muted: #64748b;
  --text: #0f172a;
  --cta: #0ea5e9;
  --info: #2563eb;
  --cold: #0891b2;
  --danger: #db6a5d;
  --alert: #db6a5d;
}

* {
  box-sizing: border-box;
}

body.admin-body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.admin-header,
.admin-footer {
  background: var(--brand-900);
  color: var(--card);
}

.admin-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-footer p {
  margin: 0;
  padding: 1rem 0;
  color: #d3dfdf;
  font-size: 0.95rem;
}

.admin-nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-brand {
  color: var(--card);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-menu-link {
  color: #deecec;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.admin-menu-link:hover,
.admin-menu-link.is-active {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--card);
}

.admin-main {
  padding: 2rem 0 3rem;
}

.auth-main {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 144px);
}

.auth-card,
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(25, 65, 59, 0.08);
}

.auth-card {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 1.4rem;
}

.auth-card h1,
h1,
h2 {
  margin-top: 0;
}

.section-subtitle,
.auth-note {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

label {
  font-weight: 600;
}

input {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 1rem;
}

.card-grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 1rem;
}

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

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

.admin-card {
  padding: 1.2rem;
  background: var(--card);
}

.admin-card p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-800);
  border-color: var(--brand-800);
  color: var(--card);
}

.btn-primary:hover {
  background: var(--brand-900);
  border-color: var(--brand-900);
}


.btn-link {
  margin-top: 1rem;
  color: var(--brand-800);
  border-color: var(--border);
  background: var(--surface-soft);
}

.btn-secondary {
  border-color: var(--border);
  color: var(--muted);
  background: var(--surface-soft);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.85;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .card-grid-4,
  .card-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 0;
  }

  .card-grid-4,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}



/* Dashboard layout */
.admin-dashboard-body {
  background:
    radial-gradient(circle at top left, rgba(224, 242, 254, 0.95), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
}

.admin-dashboard-header {
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.24), transparent 28%),
    linear-gradient(135deg, #1e3a8a 0%, #1e40af 58%, #0f766e 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.admin-dashboard-nav {
  min-height: 88px;
}

.admin-dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-brand-text {
  display: grid;
  gap: 0.15rem;
}

.admin-brand-text strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.admin-brand-text small {
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 500;
}

.admin-exit-link {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  min-height: 42px;
  padding-inline: 1rem;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.admin-exit-link:hover,
.admin-exit-link:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--brand-900);
  transform: translateY(-1px);
}

.dashboard-main {
  padding: 2.4rem 0 4rem;
}

.dashboard-shell {
  width: min(1160px, 92%);
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.65rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.9)),
    radial-gradient(circle at 88% 12%, rgba(204, 251, 241, 0.75), transparent 16rem);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.dashboard-eyebrow {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-hero h1 {
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dashboard-subtitle {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.dashboard-grid {
  gap: 1.15rem;
  margin-top: 0;
}

/* Dashboard UI */
.dash-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 22px;
  height: 100%;
}

.dash-card {
  position: relative;
  min-height: 100%;
  height: 100%;
  padding: 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dash-card-link:hover .dash-card,
.dash-card-link:focus-visible .dash-card {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.14);
}

.dash-card-link:hover .dash-icon,
.dash-card-link:focus-visible .dash-icon {
  transform: translateY(-2px) rotate(-2deg);
}

.dash-card-link:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 4px;
}

.dash-card h2 {
  color: var(--text);
  font-size: 1.28rem;
  margin: 0;
}

.dash-card p {
  margin: 0;
  flex: 1;
  font-size: 0.99rem;
  line-height: 1.55;
}

.dash-icon {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e0f2fe, #ccfbf1);
  border: 1px solid #bae6fd;
  color: var(--brand-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 180ms ease;
}

.dash-icon-svg {
  width: 29px;
  height: 29px;
}

.dash-btn {
  width: 100%;
  margin-top: 0.4rem;
  font-size: 0.96rem;
  min-height: 46px;
  background: var(--brand-700);
  border-color: var(--brand-700);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.16);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dash-card-link:hover .dash-btn,
.dash-card-link:focus-visible .dash-btn {
  background: var(--brand-900);
  border-color: var(--brand-900);
  box-shadow: 0 12px 22px rgba(30, 58, 138, 0.22);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--card);
}

.btn-danger:hover {
  background: #c6584b;
  border-color: #c6584b;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 33, 0.5);
}

.confirm-modal__dialog {
  position: relative;
  width: min(520px, calc(100% - 2rem));
  margin: 10vh auto 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(16, 35, 33, 0.22);
  padding: 1.2rem;
}

.confirm-modal__dialog h2 {
  margin: 0 0 0.5rem;
}

.confirm-modal__dialog p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .admin-dashboard-nav,
  .dashboard-hero {
    align-items: flex-start;
  }

  .admin-dashboard-nav,
  .dashboard-hero {
    flex-direction: column;
  }

  .dashboard-hero {
    padding: 1.25rem;
    border-radius: 20px;
  }

}

@media (max-width: 640px) {
  .admin-dashboard-nav {
    gap: 0.9rem;
  }

  .admin-dashboard-brand {
    align-items: flex-start;
  }

  .admin-menu,
  .admin-menu li,
  .admin-exit-link {
    width: 100%;
  }

  .admin-exit-link {
    justify-content: center;
  }

  .dashboard-main {
    padding-top: 1.4rem;
  }

  .dash-card {
    padding: 1.25rem;
  }
}

/* Administrative login */
body.auth-body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(204, 251, 241, 0.78), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(224, 242, 254, 0.95), transparent 20rem),
    linear-gradient(135deg, #f8fafc 0%, #eef8ff 52%, #e0f2fe 100%);
}

body.auth-body::before,
body.auth-body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(6px);
}

body.auth-body::before {
  width: 18rem;
  height: 18rem;
  left: -7rem;
  bottom: 8%;
  background: rgba(204, 251, 241, 0.62);
}

body.auth-body::after {
  width: 15rem;
  height: 15rem;
  right: -5rem;
  top: 22%;
  background: rgba(37, 99, 235, 0.1);
}

.auth-header {
  position: relative;
  z-index: 1;
  min-height: 0;
  background: transparent;
  border: 0;
  color: var(--text);
}

.auth-main {
  position: relative;
  z-index: 1;
  place-items: center;
  min-height: 100vh;
  padding: clamp(1.25rem, 4vw, 3rem) 1rem;
}

.auth-card {
  position: relative;
  width: min(100%, 31rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(30, 58, 138, 0.08);
  backdrop-filter: blur(14px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.35rem;
  background: linear-gradient(90deg, #1e3a8a, #2563eb, #14b8a6);
}

.auth-brand-mark {
  margin: 0 auto 1.4rem;
  display: flex;
  justify-content: center;
}

.auth-logo {
  display: block;
  width: min(11rem, 58vw);
  max-height: 8rem;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(30, 58, 138, 0.14));
}

.auth-heading {
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.auth-note {
  margin: 0;
  color: var(--brand-900);
  font-weight: 700;
}


.auth-alert {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

.auth-alert p {
  margin: 0;
}

.auth-alert p + p {
  margin-top: 0.4rem;
}

.auth-form {
  gap: 1.15rem;
  margin-top: 1.5rem;
}

.auth-field label {
  color: #334155;
  font-size: 0.95rem;
}

.auth-field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-field input:hover {
  border-color: #93c5fd;
  background: #ffffff;
}

.auth-field input:focus-visible {
  border-color: var(--brand-700);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.auth-submit {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.15rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: linear-gradient(135deg, #172554, var(--brand-700));
  box-shadow: 0 16px 30px rgba(30, 58, 138, 0.25);
  filter: saturate(1.05);
  transform: translateY(-1px);
}

.auth-back-link {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.85rem;
  border-radius: 14px;
  background: #ffffff;
  color: var(--brand-900);
  box-shadow: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

@media (max-width: 640px) {
  .auth-main {
    min-height: 100vh;
    padding: 1rem;
  }

  .auth-card {
    border-radius: 22px;
  }

  .auth-logo {
    width: min(9rem, 64vw);
    max-height: 6.5rem;
  }
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 3.25rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--brand-900);
}

.password-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.password-eye-closed,
.password-toggle.is-visible .password-eye-open {
  display: none;
}

.password-toggle.is-visible .password-eye-closed {
  display: block;
}

.caps-lock-warning {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.88rem;
  font-weight: 700;
}

.caps-lock-warning::before {
  content: "⚠ ";
}

/* Mobile-first refinements for login, dashboard and admin modules. */
@media (max-width: 760px) {
  .admin-body {
    min-width: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
  }

  .admin-container,
  .dashboard-shell,
  .averias-shell,
  .avisos-list-shell,
  .aviso-form-shell,
  .junta-list-shell,
  .junta-form-shell,
  .tarifas-edit-shell,
  .documentos-list-shell,
  .documentos-upload-shell {
    width: min(100% - 1rem, 100%) !important;
    max-width: none;
  }

  .admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: auto;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  .admin-nav-wrap,
  .admin-dashboard-nav {
    min-height: 64px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 0.65rem;
  }

  .admin-brand,
  .admin-dashboard-brand {
    min-width: 0;
  }

  .admin-brand-text strong {
    color: #0f172a;
    font-size: 0.98rem;
  }

  .admin-brand-text small {
    color: #64748b;
    font-size: 0.76rem;
  }

  .admin-menu {
    width: auto;
  }

  .admin-exit-link,
  .admin-menu-link,
  .btn,
  .dash-btn,
  .junta-actions-row .btn,
  .documentos-secondary-btn,
  .documentos-back-link {
    min-height: 42px;
    border-radius: 13px;
    font-size: 0.9rem;
  }

  .admin-main,
  .dashboard-main,
  .averias-main,
  .avisos-main,
  .junta-main,
  .tarifas-main {
    padding: 1rem 0 1.5rem !important;
  }

  .dashboard-hero,
  .averias-hero,
  .junta-form-hero,
  .junta-list-hero,
  .tarifas-home-hero,
  .tarifas-page-heading,
  .avisos-list-hero,
  .avisos-form-hero,
  .documentos-page-heading,
  .dash-section-heading {
    display: grid !important;
    gap: 0.75rem;
    padding: 1rem !important;
    border-radius: 18px !important;
    text-align: left;
  }

  .dashboard-eyebrow,
  .averias-kicker,
  .junta-kicker,
  .tarifas-kicker {
    width: fit-content;
    font-size: 0.7rem;
  }

  .dashboard-hero h1,
  .averias-hero h1,
  .junta-form-hero h1,
  .junta-list-hero h1,
  .tarifas-page-heading h1,
  .avisos-list-hero h1,
  .avisos-form-hero h1,
  .dash-section-heading h1 {
    font-size: clamp(1.45rem, 8vw, 1.9rem) !important;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .dashboard-subtitle,
  .section-subtitle,
  .averias-hero p,
  .tarifas-page-heading .section-subtitle {
    max-width: none;
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
  }

  .dashboard-grid,
  .card-grid,
  .admin-cards-grid,
  .documentos-actions-grid,
  .tarifas-home-grid,
  .junta-form-grid,
  .junta-form-grid-two,
  .junta-form-grid-media,
  .tarifa-form-grid,
  .form-grid,
  .dash-form-grid,
  .averias-filter-grid,
  .documentos-filter-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .dash-card-link,
  .dash-card,
  .admin-card,
  .aviso-admin-card,
  .averia-report-card,
  .junta-member-card,
  .documentos-admin-card,
  .tarifa-panel-card,
  .filtros-card,
  .detail-card,
  .form-card,
  .dash-form {
    border-radius: 18px !important;
  }

  .dash-card,
  .admin-card,
  .aviso-admin-card,
  .averia-report-card,
  .junta-member-card,
  .documentos-admin-card,
  .tarifa-panel-card,
  .filtros-card,
  .detail-card,
  .form-card,
  .dash-form {
    padding: 1rem !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08) !important;
  }

  .dash-card {
    min-height: auto;
    gap: 0.65rem;
  }

  .dash-icon {
    width: 46px;
    height: 46px;
  }

  .dash-icon-svg {
    width: 23px;
    height: 23px;
  }

  .dash-card h2,
  .admin-card h2,
  .aviso-admin-main h2,
  .junta-member-copy h2,
  .tarifas-list-heading h2,
  .documentos-admin-card h2 {
    font-size: 1.08rem !important;
    line-height: 1.2;
  }

  .dash-card p,
  .admin-card p,
  .aviso-admin-main p,
  .averia-report-card p,
  .documentos-admin-card p,
  .tarifa-panel-card p {
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
  }

  .dash-btn,
  .dashboard-grid .btn,
  .tarifas-home-actions .btn,
  .junta-primary-action,
  .avisos-primary-action,
  .documentos-primary-action,
  .averias-filter-btn {
    width: 100%;
    justify-content: center;
  }

  .actions-row,
  .dash-actions,
  .junta-actions-row,
  .junta-member-actions,
  .junta-form-actions,
  .documentos-actions,
  .tarifas-home-actions,
  .avisos-list-actions,
  .junta-list-actions,
  .averias-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
    width: 100%;
  }

  .actions-row .btn,
  .dash-actions .btn,
  .junta-actions-row .btn,
  .junta-member-actions .btn,
  .junta-form-actions .btn,
  .documentos-actions .btn,
  .tarifas-home-actions .btn,
  .avisos-list-actions .btn,
  .junta-list-actions .btn,
  .averias-hero-actions .btn,
  .actions-row form,
  .junta-member-actions form {
    width: 100% !important;
  }

  .actions-row button,
  .junta-member-actions button {
    width: 100%;
  }

  .form-field,
  .junta-field,
  .dash-field,
  .tarifa-field {
    min-width: 0;
  }

  input,
  select,
  textarea,
  .field-input,
  .dash-input,
  .dash-select {
    max-width: 100%;
    font-size: 16px !important;
  }

  textarea {
    min-height: 104px;
  }

  .admin-table,
  .dash-table,
  .tarifas-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 560px) {
  .auth-header {
    display: none;
  }

  .auth-main {
    min-height: 100svh;
    padding: 0.75rem !important;
    align-items: center;
  }

  .auth-card {
    width: 100%;
    padding: 1rem !important;
    border-radius: 20px !important;
  }

  .auth-brand-mark {
    margin-bottom: 0.85rem;
  }

  .auth-logo {
    width: min(8.5rem, 48vw);
    max-height: 6rem;
  }

  .auth-card h1 {
    font-size: 1.55rem;
  }

  .auth-note {
    font-size: 0.9rem;
  }

  .auth-form {
    gap: 0.85rem;
    margin-top: 1rem;
  }

  .auth-field input,
  .password-input-wrap input {
    min-height: 46px;
    border-radius: 13px;
  }

  .auth-submit,
  .auth-back-link {
    min-height: 46px;
    border-radius: 13px;
  }

  .admin-nav-wrap,
  .admin-dashboard-nav {
    min-height: 58px !important;
  }

  .admin-brand-text small {
    display: none;
  }

  .dashboard-grid {
    gap: 0.7rem !important;
  }

  .dash-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .dash-card p,
  .dash-card .dash-btn {
    grid-column: 1 / -1;
  }
}
