:root{

  --brand: #122345;      /* institucional */
  --accent: #C49828;     /* pop */
  --bg: #fcfcfb;       
  --surface: #FFFFFF;    
  --ink: #020E1D;       
  --muted: rgba(2,14,29,.70);
  --line: rgba(2,14,29,.12);

  --radius: 14px;
  --shadow: 0 10px 24px rgba(2,14,29,.08);
  --shadow2: 0 6px 16px rgba(2,14,29,.08);

  --focus: 0 0 0 3px rgba(196,152,40,.22);
  --font-base: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

/* Reset / base */
* { 
  box-sizing:border-box; 
}

html,body { 
  height:100%; 
} 

body {
  margin:0;
  font-family: var(--font-base);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height:1.5;
}

a { 
  color: inherit; 
}

/* Layout */
.adm {
  min-height:100vh;
  display:grid;
  grid-template-columns: 200px 1fr; 
}

.adm__main {
  display:flex;
  flex-direction:column;
  min-width: 0;
}

.grid {
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-12 { 
  grid-column: span 12; 
}

.col-6 { 
  grid-column: span 6; 
}

.col-4 { 
  grid-column: span 4; 
}

/* Sidebar */
.adm__side{
  position: relative;
  background: linear-gradient(180deg, #F6F4EF 0%, #EDEBE6 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.adm__side::before {
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(90% 70% at 25% 20%, rgba(196,152,40,.28), transparent 25%),
    radial-gradient(85% 65% at 70% 55%, rgba(18,35,69,.10), transparent 30%),
    radial-gradient(80% 70% at 40% 95%, rgba(196,152,40,.18), transparent 30%);
  filter: blur(60px);
  pointer-events:none;
  z-index:0;
}

.adm__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 42px 10px 14px;
}

.adm__logo,
.adm__toplogo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.adm__logo {
  margin: 0 auto;
  height: 50px;     
  width: auto;
}

.adm__side .adm__logo {
  height: 52px;          
}

.adm__brandtitle {
  font-weight: 800;
  letter-spacing: .3px;
  font-size: 14px;
  line-height: 1.1;
}

.adm__brandsub {
  font-size: 12px;
  opacity: .78;
  margin-top: 2px;
}

.adm__nav {
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.adm__link {
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: #122345;
  background: transparent;
  border: 1px solid transparent;
}

.adm__link:hover {
  background: rgba(18,35,69,.06);
  border-color: rgba(18,35,69,.12);
}

.adm__link:focus-visible {
  outline:none;
  box-shadow: var(--focus);
}

.adm__link.is-active {
  background: rgba(18,35,69,.10);
  border-color: rgba(18,35,69,.25);
  color: #122345;
  position: relative;
}

.adm__link.is-active::before{
  content:"";
  position:absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: #122345;
}

.adm__nav{
  display:flex;
  flex-direction:column;
}

.adm__link--external{
  margin-top: auto;
  padding: 14px 12px 6px;
  border-top: 1px solid rgba(2,14,29,.12);
  background: transparent;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;

  color: rgba(18,35,69,.92);
  font-weight: 700;
  text-decoration: none;
}

.adm__link--external span{
  display:inline-flex;
  align-items:center;
  gap: 8px;
}

.adm__link--external span::after{
  font-size: 12px;
  opacity: .65;
}

.adm__link--external:hover{
  background: transparent;
  border-color: rgba(2,14,29,.12);
  text-decoration: underline;
}

/* Topbar */
.adm__top { 
  position: sticky;
  top: 0;
  z-index: 5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 22px;
  background: rgba(254,253,250,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.adm__topbrand{
  display:flex;
  align-items:center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.adm__toplogo{
  height: 95px;   
  width: auto;
}

.adm__h1{
  margin:0;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .2px;
  color: var(--brand);
}

.adm__userbox {
  display:flex;
  align-items:center;
  gap: 10px;
}

.adm__user {
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: rgba(2,14,29,.84);
  font-size: 13px;
}

.adm__btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--brand);
  color: var(--bg);
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.adm__btn:hover {
  border-color: rgba(18,35,69,.28);
  box-shadow: var(--shadow2);
  transform: translateY(-1px);
}

.adm__btn:focus-visible {
  outline:none;
  box-shadow: var(--focus);
}

/* Btn cerrar sesion */
.adm__top .adm__btn--ghost{
  background: #1b3466;             
  color: #fff;
  border-color: #122345;
  border-radius: 999px;            
}


/* Hover: azul + claro */
.adm__top .adm__btn--ghost:hover{
  background: #3559a2;              
  border-color: #3559a2;
  box-shadow: 0 6px 14px rgba(18,35,69,.22);
  transform: translateY(-1px);
}

/* Contenido */
.adm__content {
  padding: 22px;
  max-width: 1100px;
}

/* Cards / acciones / home */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}

.card__title { 
  margin:0; 
  font-size:19px; 
  font-weight: 750;
  color: var(--brand); 
}

.card__sub { 
  margin:6px 0 0; 
  color: var(--muted); 
  font-size:13px; 
}

/* Panel Home - Accesos rapidos */
.card--home{
  background:
    linear-gradient(180deg, rgba(18,35,69,.04), rgba(18,35,69,0)),
    var(--surface);
  border-top: 3px solid rgba(18,35,69,.18);
}

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

.accion{
  display:flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(2,14,29,.14);
  background: #FBFBF9;
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.accion:hover{
  transform: translateY(-1px);
  background: #FFFFFF;
  border-color: rgba(18,35,69,.28);
  box-shadow: 0 8px 18px rgba(2,14,29,.10);
}

.accion:focus-visible { 
  outline:none; 
  box-shadow: var(--focus); 
}

.accion__icon{
  width: 36px;
  height: 36px;
  display:grid;
  place-items:center;
  border-radius: 12px;
  background: rgba(27,52,102, .70); 
  border-color: rgba(18,35,69,.30);
  color: #fff;
}

.accion__icon svg{
  width: 24px;
  height: 24px;
  display: block;
}

.accion__txt strong { 
  display:block; 
  color: var(--ink); 
  font-weight: 690px;
}

.accion__txt span { 
  display:block; 
  margin-top:2px; 
  color: var(--muted); 
  font-size: 13px; 
}

/* kpi */
.kpi {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}

.kpi__t { 
  margin:0;
  font-weight:800;
  color: var(--brand);
}

.kpi__s { 
  margin:6px 0 0; 
  color: var(--muted); 
  font-size: 13px; 
}

.table {
  width:100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.table th, .table td {
  padding: 12px;
  border-bottom: 1px solid rgba(2,14,29,.08);
  text-align:left;
  vertical-align: top;
}

.table th {
  background: rgba(209,212,220,.30);
  color: rgba(2,14,29,.86);
  font-weight: 800;
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 13px;
}

.alert--error {
  border-color: rgba(180, 40, 40, .25);
  background: rgba(180, 40, 40, .06);
}

/* Formularios */
input[type="text"], input[type="email"], input[type="password"], textarea {
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(2,14,29,.18);
  background:#fff;
}

input:focus, textarea:focus {
  outline:none;
  box-shadow: var(--focus);
  border-color: rgba(196,152,40,.55);
}

.form { 
  margin-top: 14px; 
  display:grid; 
  gap: 12px; 
}

.form__row { 
  display:grid; 
  gap: 6px; 
}

.form__label { 
  font-size: 13px; 
  font-weight: 800; 
  color: rgba(2,14,29,.86); 
}

.adm-auth__p,
.form__label {
  font-weight: 500;
}

.form__actions { 
  margin-top: 6px; 
  display:flex; 
  justify-content:flex-end; 
}

/* Auth/Login */
.adm-auth{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding: 22px;
  background:
    radial-gradient(
      70% 45% at 50% 22%,
      rgba(188, 148, 46, 0.049), 
      transparent 40%
    ),
    linear-gradient(
      180deg,
      #f9f9f7 0%,
      #f5f4f1 100%
    );
}

.adm-auth__wrap { 
  width: 100%; 
  max-width: 520px; 
}

.adm-auth__card {
  padding: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(50, 74, 123, 0.08),
      rgba(18,35,69,0)
    ),
    var(--surface);
  border-color: rgba(18,35,69,.18);
  box-shadow:
    0 12px 28px rgba(2,14,29,.12),
    0 4px 10px rgba(2,14,29,.08);
}

.adm-auth__brand {
  display:flex;
  justify-content: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.adm-auth__logo { 
  height: 80px; 
  width:auto; 
  display:block;
  align-items:center; 
}

.adm-auth__h1 { 
  margin: 0; 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--brand);
}

.adm-auth__p { 
  margin: 6px 0 0; 
  color: var(--muted); 
  font-size: 13px; 
}

/* Boton login */
.adm-auth .adm__btn{
  padding: 10px 16px; 
  font-size: 13px;   
  min-height: 38px;  
  background: #122345;       
  color: #fff;
  border-color: rgba(18,35,69,.55);
}

.adm-auth .adm__btn:hover {
  background: #2d53a0;       
  border-color: #2a4d94;
  box-shadow: 0 6px 14px rgba(18,35,69,.25);
  transform: translateY(-1px);
}

.adm-auth .adm__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(18,35,69,.25);
}

/* Responsive */
@media (max-width: 900px) {
  .adm{ grid-template-columns: 1fr; }
  .adm__side{ position: sticky; top:0; z-index:6; }
  .acciones{ grid-template-columns: 1fr; }
}

.page { 
  margin-bottom: 14px; 
}

.page__h1 {
  font-size: 23px;
  font-weight: 720;
  color: #122345;
  letter-spacing: .6px;                 
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(18,35,69,.25); 
}

.page__sub { 
  margin:0 0 40px; 
  color: var(--muted); 
  font-size:16px; }

.page--acciones{
  display:flex;
  align-items:center;      
  justify-content:space-between;
}

.page--acciones > div:first-child{
  display:flex;
  flex-direction:column;
}

.page__acciones{
  display:flex;
  align-items:center;
  gap: 10px;
}

.modal {
  border: none;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(2,14,29,.35);
  backdrop-filter: blur(4px);
}

.modal__panel {
  width: min(900px, 92vw);
  height: min(680px, 86vh);
  background:
    linear-gradient(180deg, rgba(18,35,69,.04), rgba(18,35,69,0)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  overflow: hidden;
}

.modal__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #1f3a63; 
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.modal__title {
  margin:0;
  font-size: 17px;
  font-weight: 690;
  color: var(--bg);
  letter-spacing: 0.2px;
}

.modal__close {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  border-color: rgba(255,255,255,.35);
  background: transparent;
  color: var(--bg);
  cursor:pointer;
}

.modal__close:hover {
  border-color: #315bb1;
  box-shadow: var(--shadow2);
  background: #315bb1;
}

.modal-form__title{
  margin-bottom: 6px;     
  font-size: 22px;        
  font-weight: 690;
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
}

.modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display:block;
  background: var(--surface);
}

/* Inputs usando mejor el ancho */
.modal-form input[type="text"],
.modal-form input[type="file"]{
  max-width: 640px;     
}

.modal-page {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-base);
}

.modal-page__content {
  padding: 16px;

}
.modal__body{
  padding: 24px 32px;   
}

.modal-form__body{
  gap: 18px;
}

.modal__head{
  padding: 16px 32px;
}

.modal-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.modal-form__head {
  margin-bottom: 12px;
}

.modal-form__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
}

.modal-form__sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-form__current {
  margin: 0 0 12px;
  font-size: 13px;
}

.modal-form__body {
  display: grid;
  gap: 12px;
}

.modal-form__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Documentos admin – filas */
.doc-row{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;

  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.doc-row:last-child{
  border-bottom: none;
}

.doc-main{
  display: grid;
  gap: 4px;
}

.doc-title{
  font-weight: 700;
}

.doc-file{
  font-size: 13px;
  color: var(--muted);
}


.doc-link{
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.doc-link:hover{
  text-decoration: underline;
}

.doc-actions{
  display: inline-flex;
  align-items: center;  
  gap: 8px;
}

.doc-actions form{
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.doc-actions .adm__btn{
  min-width: 88px;
  height: 34px;
  padding: 0 14px;
  line-height: 34px;     
}

/* Botn editar */
.adm__btn--edit{
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
}

.adm__btn--edit:hover{
  background: rgba(39, 77, 152, 0.06);
  border-color: rgba(18,35,69,.28);
}

/* Botón Borrar */
.adm__btn--borrar{
  background: #122345;
  color: #fff;
  border-color: #122345;
}

.adm__btn--borrar:hover{
  background: #315bb1;
  border-color: #315cb2;
  box-shadow: 0 6px 14px rgba(18,35,69,.25);
}

/* Mensajes tipo tabla */
.msgs-table{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

/* Cabecera */
.msgs-head{
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 3fr;
  background: rgba(10, 35, 84, 0.908);
  font-weight: 700;
  font-size: 13px;
  color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.msgs-head > div,
.msgs-row > div{
  padding: 12px 18px;   
}

.msgs-date{
  text-align: left;      
  white-space: nowrap;
}

.msgs-email{
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}

/* Filas */
.msgs-row{
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 3fr;
  border-bottom: 1px solid rgba(2,14,29,.08);
}

.msgs-row:last-child{
  border-bottom: none;
}

.msgs-row > div{
  padding: 12px 14px;
  font-size: 13px;
}

/* Ajustes por columna */
.msgs-name{
  font-weight: 600;
}

.msgs-date{
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.msgs-text{
  color: var(--ink);
}
