  :root{
    --bg:#F3F5FC;
    --bg-alt:#E7EBFA;
    --ink:#101B3D;
    --navy:#16225C;
    --teal:#2F4AD1;
    --teal-light:#8AA0F5;
    --teal-dark:#1F35A6;
    --alert:#E4572E;
    --warn:#DB9A2C;
    --success:#2E9C63;
    --card:#FFFFFF;
    --border:#D6DCF5;
    --radius:14px;
    --shadow: 0 4px 18px rgba(11,49,66,0.08);
    --font-display:'Space Grotesk', sans-serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'IBM Plex Mono', monospace;
  }
  *{box-sizing:border-box;}
  body{margin:0;}
  #esturion-root{
    font-family:var(--font-body);
    color:var(--ink);
    background:var(--bg);
    min-height:600px;
    border-radius:18px;
    overflow:hidden;
    border:1px solid var(--border);
  }
  .es-topbar{
    background:linear-gradient(120deg,var(--navy) 0%, var(--teal-dark) 100%);
    color:#fff;
    padding:14px 22px 26px 22px;
    position:relative;
  }
  .es-topbar-row{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
  }
  .es-brand{ display:flex; align-items:center; gap:12px; }
  .es-logo-wrap{
    width:48px; height:48px; border-radius:12px; background:rgba(255,255,255,0.12);
    display:flex; align-items:center; justify-content:center; overflow:hidden;
    border:1.5px solid rgba(255,255,255,0.35); cursor:pointer; flex-shrink:0;
  }
  .es-logo-wrap img{ width:100%; height:100%; object-fit:cover; }
  .es-logo-wrap svg{ width:26px; height:26px; opacity:0.9; }
  .es-brand-text h1{
    font-family:var(--font-display); font-size:19px; margin:0; letter-spacing:0.2px; font-weight:700;
  }
  .es-brand-text span{ font-size:11.5px; opacity:0.75; letter-spacing:0.4px; text-transform:uppercase; }
  .es-session{ display:flex; align-items:center; gap:10px; font-size:13px; }
  .es-session button{
    background:rgba(255,255,255,0.14); color:#fff; border:1px solid rgba(255,255,255,0.3);
    padding:7px 13px; border-radius:8px; cursor:pointer; font-family:var(--font-body); font-weight:600; font-size:12.5px;
  }
  .es-session button:hover{ background:rgba(255,255,255,0.24); }
  .es-wave{ position:absolute; left:0; right:0; bottom:-1px; line-height:0; }
  .es-wave svg{ width:100%; height:22px; display:block; }

  .es-body{ padding:22px 22px 30px 22px; }
  .es-auth-wrap{ max-width:380px; margin:26px auto 10px auto; }
  .es-card{
    background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
    padding:20px; box-shadow:var(--shadow);
  }
  .es-auth-tabs{ display:flex; gap:6px; margin-bottom:16px; }
  .es-auth-tabs button{
    flex:1; padding:9px; border-radius:8px; border:1px solid var(--border); background:var(--bg-alt);
    font-family:var(--font-body); font-weight:600; font-size:13px; cursor:pointer; color:var(--ink);
  }
  .es-auth-tabs button.active{ background:var(--teal); color:#fff; border-color:var(--teal); }
  label.es-label{ display:block; font-size:12px; font-weight:600; margin:10px 0 4px 0; color:var(--navy); }
  input.es-input, select.es-input{
    width:100%; padding:9px 10px; border-radius:8px; border:1px solid var(--border);
    font-family:var(--font-body); font-size:13.5px; background:#fff; color:var(--ink);
  }
  input.es-input:focus, select.es-input:focus{ outline:2px solid var(--teal-light); border-color:var(--teal); }
  .es-btn{
    background:var(--teal); color:#fff; border:none; padding:10px 16px; border-radius:9px;
    font-weight:700; font-size:13.5px; cursor:pointer; font-family:var(--font-body);
  }
  .es-btn:hover{ background:var(--teal-dark); }
  .es-btn.secondary{ background:var(--bg-alt); color:var(--navy); border:1px solid var(--border); }
  .es-btn.secondary:hover{ background:#d7ecee; }
  .es-btn.danger{ background:var(--alert); }
  .es-btn:disabled{ opacity:0.5; cursor:not-allowed; }
  .es-error{ color:var(--alert); font-size:12.5px; margin-top:8px; font-weight:600; }
  .es-hint{ color:#5b7480; font-size:11.5px; margin-top:10px; line-height:1.5; }

  .es-layout{ display:flex; align-items:stretch; min-height:520px; }
  .es-sidebar{
    width:210px; flex-shrink:0; background:var(--bg-alt); border-right:1px solid var(--border);
    padding:16px 10px; display:flex; flex-direction:column; gap:2px;
  }
  .es-sidebar button{
    display:flex; align-items:center; gap:10px; width:100%; text-align:left;
    padding:10px 12px; border-radius:9px; border:none; background:transparent;
    font-family:var(--font-body); font-weight:600; font-size:13px; color:var(--navy); cursor:pointer;
  }
  .es-sidebar button:hover{ background:rgba(30,142,90,0.10); }
  .es-sidebar button.active{ background:var(--teal); color:#fff; }
  .es-sidebar button.active svg{ stroke:#fff; }
  .es-sidebar button svg{ width:17px; height:17px; stroke:var(--teal-dark); flex-shrink:0; }
  .es-sidebar button.active svg{ stroke:#fff; }
  .es-main{ flex:1; min-width:0; padding:22px 24px 30px 24px; }
  @media (max-width:640px){
    .es-sidebar{
      width:92px; flex-shrink:0; padding:12px 6px; gap:3px;
    }
    .es-sidebar button{
      flex-direction:column; gap:3px; padding:8px 4px; font-size:9.5px; white-space:normal;
      text-align:center; line-height:1.15;
    }
    .es-main{ padding:16px 12px 24px 12px; }
  }

  @media (max-width:400px){
    .es-sidebar{ width:78px; }
    .es-sidebar button{ font-size:8.8px; }
  }

  .es-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  @media (max-width:640px){ .es-grid{ grid-template-columns:1fr; } }

  h2.es-h{ font-family:var(--font-display); font-size:17px; margin:0 0 4px 0; color:var(--navy); }
  p.es-sub{ font-size:12.5px; color:#5b7480; margin:0 0 14px 0; }

  .es-avatar{
    width:64px; height:64px; border-radius:50%; object-fit:cover; border:2px solid var(--teal-light);
    background:var(--bg-alt); flex-shrink:0;
  }
  .es-avatar-sm{
    width:32px; height:32px; border-radius:50%; object-fit:cover; border:1.5px solid var(--teal-light);
    background:var(--bg-alt); flex-shrink:0;
  }
  .es-profile-head{ display:flex; align-items:center; gap:14px; margin-bottom:10px; }
  .es-profile-head .name{ font-weight:700; font-size:15px; }
  .es-profile-head .role{ font-size:11.5px; color:var(--teal-dark); text-transform:uppercase; font-weight:700; letter-spacing:0.3px; }

  .es-badge{ display:inline-block; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; font-family:var(--font-mono); }
  .es-badge.ok{ background:#E1F5EA; color:var(--success); }
  .es-badge.warn{ background:#FCF0DA; color:var(--warn); }
  .es-badge.bad{ background:#FBE3DC; color:var(--alert); }

  .es-list-item{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:11px 12px; border:1px solid var(--border); border-radius:10px; margin-bottom:8px; background:#fff;
  }
  .es-list-item .meta{ font-size:12px; color:#5b7480; font-family:var(--font-mono); }
  .es-empty{ text-align:center; padding:26px 10px; color:#7c95a0; font-size:13px; }
  .es-empty svg{ opacity:0.5; margin-bottom:6px; }

  table.es-table{ display:block; width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; border-collapse:collapse; font-size:12.5px; }
  table.es-table thead, table.es-table tbody{ display:table; width:100%; min-width:100%; }
  table.es-table th{ text-align:left; padding:8px 8px; color:#5b7480; font-size:11px; text-transform:uppercase; letter-spacing:0.3px; border-bottom:1px solid var(--border); white-space:nowrap; }
  table.es-table td{ padding:9px 8px; border-bottom:1px solid var(--border); white-space:nowrap; }
  table.es-table tr:last-child td{ border-bottom:none; }

  .es-alertbar{
    background:#FDEEE7; border:1px solid #F3C4AE; color:#9A3A1D; padding:10px 14px; border-radius:10px;
    font-size:12.5px; font-weight:600; margin-bottom:14px; display:flex; align-items:center; gap:8px;
  }
  .es-toast{
    position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff;
    padding:10px 18px; border-radius:9px; font-size:13px; font-weight:600; z-index:50; box-shadow:var(--shadow);
  }
  .es-modal-bg{ position:fixed; inset:0; background:rgba(11,46,58,0.45); display:flex; align-items:center; justify-content:center; z-index:40; padding:16px; }
  .es-modal{ background:#fff; border-radius:14px; padding:20px; max-width:360px; width:100%; box-shadow:var(--shadow); }
  .es-flex-between{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .es-muted{ color:#7c95a0; }
  a.es-link{ color:var(--teal-dark); font-weight:600; cursor:pointer; }

/* --- estilos base de página (fuera del artefacto original) --- */
html, body{
  margin:0; padding:0; background:var(--bg-alt); font-family:var(--font-body);
}
#esturion-root{
  max-width:780px; margin:24px auto; min-height:calc(100vh - 48px);
  border-radius:18px; overflow:hidden; border:1px solid var(--border); background:var(--bg);
}
@media (min-width:1000px){
  #esturion-root{ max-width:1180px; }
  .es-sidebar{ width:230px; }
  .es-main{ padding:28px 34px 36px 34px; }
}
@media (min-width:1400px){
  #esturion-root{ max-width:1360px; }
}
@media (max-width:820px){ #esturion-root{ margin:0; border-radius:0; min-height:100vh; } }

/* --- ajustes móviles adicionales (todos los módulos) --- */
@media (max-width:640px){
  /* Tarjetas y espaciado general más compacto */
  .es-card{ padding:16px; }
  .es-body{ padding:16px 14px 24px 14px; }

  /* Botones e inputs con área táctil suficiente */
  .es-btn{ min-height:40px; padding-top:10px; padding-bottom:10px; }
  input.es-input, select.es-input, textarea.es-input{ min-height:40px; font-size:14px; }

  /* Encabezado: que el correo/nombre largo no rompa el layout */
  .es-topbar{ padding:12px 14px 22px 14px; }
  .es-topbar-row{ flex-wrap:wrap; row-gap:8px; }
  .es-brand-text h1{ font-size:16px; }
  .es-brand-text span{ font-size:10px; }
  .es-session{ font-size:11.5px; max-width:100%; }
  .es-session span{
    max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    display:inline-block; vertical-align:middle;
  }
  .es-session button{ padding:6px 10px; font-size:11.5px; }
  .es-logo-wrap{ width:40px; height:40px; }

  /* Filas flexibles: que envuelvan en vez de desbordar */
  .es-flex-between{ flex-wrap:wrap; row-gap:6px; }
  .es-list-item{ flex-wrap:wrap; row-gap:8px; }
  .es-profile-head{ flex-wrap:wrap; }

  /* Tarjetas de horarios/clases dentro del calendario semanal */
  .es-avatar{ width:52px; height:52px; }

  /* Auth (login/registro/recuperación) a ancho completo */
  .es-auth-wrap{ max-width:100%; margin:10px auto 0 auto; }

  h2.es-h{ font-size:15px; }
  p.es-sub{ font-size:11.5px; }
}

/* Pantallas muy angostas (celulares pequeños) */
@media (max-width:380px){
  .es-sidebar button{ font-size:9.5px; padding:7px 9px; }
  .es-brand-text span{ display:none; }
}
