/* Tema alineado con suite.iesa.es. Se carga tras main-new.css y sobrescribe su aspecto. */
:root{
  --brand: #1f334d;
  --brand-dark: #19283d;
  --brand-hover: #253b59;
  --blue: #2563eb;
  --green: #16a34a;
  --line: #d9e1ea;
  --text: #172033;
  --muted: #64748b;
  --surface: #fff;
  --surface-2: #f8fafc;
  --radius-sm: .5rem;
  --radius-md: .82rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 8px 20px rgba(15,23,42,.10);
  --focus-ring: 0 0 0 3px rgba(37,99,235,.35);
}

/* Tipografía y fondo */
*{ font-family: "Manrope", Arial, sans-serif; }
h1,h2,h3,h4{ font-family: "Manrope", Arial, sans-serif; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
p{ letter-spacing: 0; }
body{ background: #edf2f8; color: #1f2937; max-width: none; }
main{ background: #edf2f8; min-height: calc(100vh - 8rem); }
a{ color: var(--blue); }
a:hover{ color: #1d4ed8; }

/* Barra superior */
.ads-topbar{ background: var(--brand); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 -1px 0 rgba(255,255,255,.04); }
.ads-topbar .navbar{ background: transparent !important; padding: .55rem 1.1rem; }
.ads-topbar .navbar-brand img.logo{ height: 34px; max-width: 160px; object-fit: contain; }
.ads-topbar .navbar-toggler{ border-color: rgba(255,255,255,.25); }

.ads-topbar .nav-link{
  display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 .15rem; padding: .5rem .85rem;
  font-size: .92rem; font-weight: 700; letter-spacing: 0;
  color: rgba(219,234,254,.82) !important;
  border-radius: var(--radius-md);
  transition: background .18s, color .18s;
}
.ads-topbar .nav-link:hover{ background: var(--brand-hover); color: #fff !important; }
.ads-topbar .nav-link.active{ background: var(--brand-dark); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(147,197,253,.28); }
.ads-topbar .nav-link.disabled{ opacity: .4; }

/* Login / usuario en la barra */
.ads-topbar .input-group-text,
.ads-topbar .form-control{
  background: var(--brand-dark); color: #fff;
  border: 1px solid rgba(255,255,255,.14); font-size: .85rem !important;
}
.ads-topbar .form-control::placeholder{ color: rgba(219,234,254,.55); }
.ads-topbar .form-control:focus{ box-shadow: var(--focus-ring); border-color: rgba(147,197,253,.5); }
.ads-topbar .submit-header-form,
.ads-topbar .logout{
  justify-content: center; cursor: pointer;
  background: var(--blue); color: #fff; border: 0; border-radius: var(--radius-md);
  padding: .45rem .7rem; margin: 0;
}
.ads-topbar .submit-header-form{ width: 100%; }
.ads-topbar .submit-header-form:hover,
.ads-topbar .logout:hover{ background: #1d4ed8; color: #fff; filter: none; }
.ads-user{
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .3rem .4rem .3rem .85rem; border-radius: 999px;
  background: var(--brand-dark); border: 1px solid rgba(255,255,255,.14); color: #fff;
}
.ads-user .logout{ border-radius: 999px; padding: .3rem .6rem; }

/* Submenús */
.bg-color-gray-light{ background: var(--surface) !important; border-bottom: 1px solid var(--line); }
.nav-sublink{
  display: inline-block; margin: 0 .15rem !important; padding: .4rem .8rem !important;
  font-size: .88rem; font-weight: 700; color: var(--muted) !important;
  border-radius: var(--radius-md) !important; transition: background .18s, color .18s;
}
.nav-sublink:hover{ background: #eef4fb; color: #1d4ed8 !important; }
.nav-sublink.active{ background: var(--blue); color: #fff !important; box-shadow: 0 6px 14px rgba(37,99,235,.25); }

/* Paneles de contenido */
.bg-color-grey-light{ background: var(--surface) !important; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.bg-color-blue-light{ background: transparent !important; }
.full-container{ background: transparent; }

.card{ border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm) !important; background: var(--surface); }

/* Formularios */
.form-control,.form-select,.input-group-text{
  border-color: var(--line); border-radius: var(--radius-md); color: var(--text);
}
.input-group > .input-group-text{ background: var(--surface-2); color: var(--muted); }
.input-group > :not(:first-child){ border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child){ border-top-right-radius: 0; border-bottom-right-radius: 0; }
.form-control:focus,.form-select:focus{ border-color: var(--blue); box-shadow: var(--focus-ring); }
.form-check-input:checked{ background-color: var(--blue); border-color: var(--blue); }
label,.form-check-label{ font-weight: 600; color: #26364f; }

/* Botones */
.btn{
  font-size: .9rem; font-weight: 700; padding: .5rem 1.1rem; margin-right: .4rem;
  border-radius: var(--radius-md);
}
.btn-sm{ font-size: .8rem; padding: .3rem .75rem; }
.btn:hover{ filter: none; transform: translateY(-1px); }
.btn:focus-visible{ box-shadow: var(--focus-ring); }
.btn-primary{ background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover,.btn-primary:focus{ background: #1d4ed8; border-color: #1d4ed8; color: #fff; box-shadow: 0 6px 14px rgba(37,99,235,.25); }
.btn-success{ background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover{ background: #15803d; border-color: #15803d; color: #fff; }
.btn-secondary{ background: var(--surface-2); border-color: var(--line); color: #26364f; }
.btn-secondary:hover{ background: #eef4fb; border-color: var(--line); color: #1d4ed8; }
.btn-danger{ background: #dc2626; border-color: #dc2626; }

/* Tablas */
.table{ --bs-table-bg: transparent; color: #26364f; font-size: .88rem; }
.table > thead > tr > th{
  background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.table > tbody > tr:hover > *{ background: var(--surface-2); }

/* Modales y badges */
.modal-content{ border: 0; border-radius: var(--radius-lg); box-shadow: 0 18px 46px rgba(15,23,42,.20); }
.modal-header{ border-bottom: 1px solid var(--line); }
.modal-footer{ border-top: 1px solid var(--line); }
.badge{ font-weight: 800; border-radius: 999px; }

/* Pie */
.ads-footer{ background: transparent; border-top: 1px solid var(--line); }
.ads-footer .footer-claim{ color: var(--muted) !important; font-size: .8rem; font-weight: 600; }

:where(a[href],button,input,select,textarea):focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){ *{ transition-duration: .01ms !important; animation-duration: .01ms !important; } }
