/* =========================================================
   Discursos - Light Elegant UI (Responsive + Mobile nav)
   Reemplaza TODO tu styles.css por este archivo.
   ========================================================= */

:root{
  /* Brand */
  --brand-50: #eef3ff;
  --brand-100:#dfe9ff;
  --brand-200:#c7d9ff;
  --brand-300:#a9c4ff;
  --brand-400:#7ea6ff;
  --brand-500:#4b82ff;
  --brand-600:#2f66f6;
  --brand-700:#2453d2;

  /* Neutros */
  --bg:      #f6f8fc;
  --panel:   #ffffff;
  --panel2:  #fbfcff;
  --text:    #0f172a;
  --muted:   #5b677a;
  --line:    #e6ebf5;

  /* Estados */
  --ok:      #1fa971;
  --warn:    #d08b00;
  --bad:     #e5484d;

  /* Sombras */
  --shadow:  0 10px 30px rgba(15, 23, 42, .08);
  --shadow2: 0 6px 18px rgba(15, 23, 42, .06);

  /* Radios */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;

  --max: 1120px;
}

/* ===== Reset/Base ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(75,130,255,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(31,169,113,.08), transparent 60%),
    var(--bg);
  line-height: 1.45;
}

a{ color: inherit; }
img{ max-width:100%; height:auto; }
::selection{ background: rgba(75,130,255,.20); }

/* ===== Layout ===== */
.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px;
}

.footer{
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--muted);
  font-size: 13px;
}

/* ===== Topbar ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 18px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
}

.brand-badge{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: linear-gradient(180deg, var(--brand-100), var(--brand-50));
  border: 1px solid rgba(75,130,255,.25);
  color: var(--brand-700);
  box-shadow: var(--shadow2);
}

/* ===== Mobile nav toggle (CSS-only) ===== */
.nav-toggle{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  left: -9999px;
}

.nav-btn{
  display:none;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  box-shadow: var(--shadow2);
  cursor:pointer;
  user-select:none;
}

.nav-btn .bars{
  width: 18px;
  height: 12px;
  position: relative;
}

.nav-btn .bars span{
  position:absolute;
  left:0; right:0;
  height:2px;
  background: rgba(15,23,42,.85);
  border-radius: 2px;
}
.nav-btn .bars span:nth-child(1){ top:0; }
.nav-btn .bars span:nth-child(2){ top:5px; opacity:.85; }
.nav-btn .bars span:nth-child(3){ top:10px; opacity:.7; }

/* ===== Nav (desktop default) ===== */
.nav{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a{
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: rgba(15,23,42,.92);
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}

.nav a:hover{
  background: rgba(75,130,255,.10);
  border-color: rgba(75,130,255,.18);
}
.nav a:active{ transform: translateY(1px); }

/* ===== Cards ===== */
.card{
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}

.card h1{
  font-size: 22px;
  margin: 0 0 6px 0;
  letter-spacing: .2px;
}

.card h2{
  font-size: 17px;
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}

.small{
  color: var(--muted);
  font-size: 13px;
}

/* ===== Grid ===== */
.row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}
.col{
  flex: 1;
  min-width: 260px;
}

/* Helpers */
.mt6{ margin-top: 6px; }
.mt10{ margin-top: 10px; }
.right{ display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }

/* ===== Inputs ===== */
label.small{
  display:block;
  margin-bottom: 6px;
}

.input, select, textarea{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: rgba(15,23,42,.92);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}

.input:focus, select:focus, textarea:focus{
  border-color: rgba(75,130,255,.55);
  box-shadow: 0 0 0 4px rgba(75,130,255,.16);
}

textarea{ resize: vertical; min-height: 46px; }
input[type="date"]{ padding: 10px 12px; }

/* ===== Buttons ===== */
.btn{
  border: 1px solid rgba(75,130,255,.30);
  background: linear-gradient(180deg, var(--brand-600), var(--brand-500));
  color: white;
  padding: 10px 13px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: var(--shadow2);
  transition: transform .08s ease, filter .12s ease;
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.6; cursor:not-allowed; box-shadow:none; }

.btn.secondary{
  border-color: rgba(15,23,42,.16);
  background: linear-gradient(180deg, #ffffff, #f2f5fb);
  color: rgba(15,23,42,.92);
}
.btn.danger{
  border-color: rgba(229,72,77,.25);
  background: linear-gradient(180deg, #ff6b6f, #e5484d);
  color: white;
}

/* ===== Badges ===== */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.14);
  color: rgba(15,23,42,.82);
  font-size: 12px;
  background: rgba(15,23,42,.04);
}
.badge.ok{ border-color: rgba(31,169,113,.22); background: rgba(31,169,113,.10); color: #0f6b46; }
.badge.warn{ border-color: rgba(208,139,0,.22); background: rgba(208,139,0,.10); color: #7a5200; }
.badge.bad{ border-color: rgba(229,72,77,.22); background: rgba(229,72,77,.10); color: #8a1d20; }

/* ===== Notice ===== */
.notice{
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.86);
  border-radius: var(--r-lg);
  padding: 12px;
  color: rgba(15,23,42,.78);
}

/* ===== Tables (general) ===== */
.table-wrap{
  width:100%;
  overflow:auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow2);
}

.table{
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th{
  color: rgba(15,23,42,.70);
  font-weight: 900;
  letter-spacing: .2px;
  background: rgba(246,248,252,.92);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* =========================================================
   ASIGNACIONES: PC contenido / Móvil scroll interno
   ========================================================= */
.assign-wrap{
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow2);
}

.assign-table{
  width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
  border-collapse: collapse;
}

.assign-table th, .assign-table td{
  vertical-align: top;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}

.assign-table .input,
.assign-table select,
.assign-table textarea{
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}

.assign-table th, .assign-table td{
  padding: 8px 8px;
  font-size: 13px;
}

.actions-stack{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Mobile first improvements ===== */
@media (max-width: 840px){
  .container{ padding: 12px; }

  /* Topbar: menu hamburguesa */
  .nav-btn{ display:flex; }
  .nav{
    display:none;
    position: absolute;
    top: 60px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .nav a{
    padding: 12px 12px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(246,248,252,.90);
  }

  /* Mostrar nav cuando está checked */
  .nav-toggle:checked ~ .nav{
    display:flex;
  }

  /* Grids: todo en columna, sin apretar */
  .row{ gap: 12px; }
  .col{ min-width: 100%; }

  /* Cards más cómodas */
  .card{ padding: 14px; border-radius: 18px; }

  /* Botones full width y más separados */
  .btn{ width: 100%; padding: 12px 14px; border-radius: 16px; }

  /* Inputs un poco más grandes */
  .input, select, textarea{ padding: 12px 12px; border-radius: 16px; }

  /* Asignaciones: scroll interno para que no se aplaste */
  .assign-wrap{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .assign-table{
    min-width: 980px;
  }
}

@media (max-width: 420px){
  .brand{ font-size: 15px; }
  .card h1{ font-size: 20px; }
  .card h2{ font-size: 16px; }
}
/* ===== Fondo parallax PNG — alineado a la izquierda ===== */
body::before{
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;

  /* Imagen */
  background-image: url("https://i.pinimg.com/564x/86/b4/03/86b403ce24ee9cdd7decec27f38d0584.jpg");
  background-repeat: no-repeat;

  /* 🔥 POSICIÓN A LA IZQUIERDA */
  background-position: left center;

  /* 🔥 TAMAÑO MÁS PEQUEÑO (ajustable) */
  background-size: 260px auto;

  /* Elegancia */
  opacity: 0.075;
  pointer-events: none;
  transform: translateZ(0);
}

/* ===== LOADER GLOBAL ===== */
#loader{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(10px);
  z-index: 9999;

  display:flex;
  align-items:center;
  justify-content:center;

  opacity: 1;
  pointer-events: auto;
  transition: opacity .35s ease;
}

#loader.is-hidden{
  opacity: 0;
  pointer-events: none;
}

/* ===== Tarjeta (contenedor) ===== */
.loader-card{
  position: relative; 
  width: 200px;      /* tamaño del loader */
  height: 200px;
  display:flex;
  align-items:center;
  justify-content:center;
  animation: popIn .45s ease;
}

/* ===== Imagen (NO rota) ===== */
.loader-img{
  width: 150px;      /* aumenta tamaño de tu logo aquí */
  height: 150px;
  object-fit: contain;
  z-index: 2;
}

/* ===== ANILLO DE CARGA ALREDEDOR ===== */
.loader-ring{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid rgba(75,130,255,0.20);   /* anillo base */
  border-top-color: rgba(75,130,255,1);      /* parte visible */
  animation: ringSpin 1.2s linear infinite;
  z-index: 1;
}

/* ===== Animaciones ===== */
@keyframes popIn{
  from{
    transform: scale(.7);
    opacity: 0;
  }
  to{
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ringSpin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
/* ============================================================
   FIX: Reuniones Recientes (Dashboard) responsive en móviles
   ============================================================ */

/* Contenedor de la tarjeta */
.card.dashboard-card {
  overflow: hidden;
}

/* Asegurar que la tabla nunca se salga */
.dashboard-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: white;
}

/* Tabla interna */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px; /* mínimo recomendado para scroll suave */
}

.dashboard-table th,
.dashboard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;  /* evita quiebres feos */
}

/* En móvil el texto no debe empujar más de la cuenta */
@media (max-width: 600px) {
  .dashboard-table th,
  .dashboard-table td {
    white-space: normal;
  }
}
/* ===== Dashboard: tabla reuniones responsive ===== */
.dash-table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #fff;
}

.dash-table{
  min-width: 520px; /* permite que no se aplaste en móviles */
}

/* Botón más compacto para tablas */
.btn-sm{
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  width: auto;
  white-space: nowrap;
}

/* En móviles: reduce padding en tabla */
@media (max-width: 600px){
  .table th, .table td{
    padding: 8px 8px;
  }
}
/* ===================================================
   Dashboard – acciones responsive (desktop vs mobile)
   =================================================== */

.actions-cell{
  position: relative;
  text-align: right;
}

/* Icon button */
.btn-icon{
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow2);
}

/* Dropdown */
.actions-menu{
  position: absolute;
  right: 0;
  top: 36px;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 50;
}

.actions-menu a{
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 14px;
}
.actions-menu a:hover{
  background: rgba(75,130,255,.08);
}

/* helpers */
.hide-mobile{ display: inline-flex; }
.show-mobile{ display: none; }

/* Mobile behavior */
@media (max-width: 600px){
  .hide-mobile{ display: none !important; }
  .show-mobile{ display: inline-flex; }
}
