/* WebClientesLab - estilos compartidos
   Paleta: dark #0D1117 / #161B22, accent cyan #26C6DA (LaboralMed)
*/
*{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:#0D1117;
  color:#F0F6FC;
  min-height:100vh;
  position:relative;
}
body.lc-login{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px;
  overflow-x:hidden;
}
body.lc-login::before{
  content:'';
  position:absolute;
  top:-30%;
  left:50%;
  transform:translateX(-50%);
  width:900px;
  height:900px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(38,198,218,.10) 0%, rgba(38,198,218,0) 65%);
  pointer-events:none;
}

/* ==========  CARD de login / registro / OTP / confirmacion  ========== */
.card{
  position:relative;
  width:100%;
  max-width:440px;
  background:#161B22;
  border:1px solid #21262D;
  border-radius:14px;
  padding:36px 32px 28px;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}
.card.wide{max-width:520px;}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;
  margin-bottom:18px;
}
.brand img{width:56px;height:56px;border-radius:12px;flex-shrink:0;}
.brand-txt{display:flex;flex-direction:column;line-height:1.15;text-align:left;}
.brand-sw{font-size:12px;color:#8B949E;letter-spacing:.12em;text-transform:uppercase;}
.brand-nm{font-size:22px;font-weight:700;color:#26C6DA;letter-spacing:-.01em;}

h1{
  font-size:18px;
  font-weight:600;
  text-align:center;
  color:#F0F6FC;
  margin-bottom:6px;
}
.sub{
  font-size:13px;
  color:#8B949E;
  text-align:center;
  margin-bottom:22px;
  line-height:1.5;
}

.line{height:1px;background:#21262D;margin:18px 0 22px;position:relative;}
.line span{
  position:absolute;top:-9px;left:50%;transform:translateX(-50%);
  background:#161B22;padding:0 12px;font-size:11px;color:#6E7681;
  letter-spacing:.14em;text-transform:uppercase;
}

label{
  display:block;font-size:11px;color:#8B949E;
  margin-bottom:6px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;
}
input,select,textarea{
  width:100%;
  background:#0D1117;
  border:1px solid #30363D;
  color:#F0F6FC;
  padding:12px 14px;
  border-radius:8px;
  font-size:15px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
  font-family:inherit;
}
input:focus,select:focus,textarea:focus{
  border-color:#26C6DA;
  box-shadow:0 0 0 3px rgba(38,198,218,.15);
}
.field{margin-bottom:14px;}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}

.btn{
  width:100%;
  border:0;
  padding:13px;
  border-radius:8px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  font-family:inherit;
  display:inline-block;
  text-align:center;
  text-decoration:none;
  transition:filter .15s, background .15s, border-color .15s, color .15s;
}
.btn-primary{
  background:#26C6DA;
  color:#0D1117;
  margin-top:6px;
}
.btn-primary:hover{filter:brightness(1.08);color:#0D1117;}
.btn-ghost{
  background:transparent;
  color:#8B949E;
  margin-top:10px;
  border:1px solid #30363D;
}
.btn-ghost:hover{color:#F0F6FC;border-color:#8B949E;}
.btn-link{
  background:transparent;
  color:#26C6DA;
  border:1px solid rgba(38,198,218,.4);
  margin-top:6px;
}
.btn-link:hover{background:rgba(38,198,218,.08);color:#26C6DA;}

.err{
  background:rgba(248,81,73,.10);
  border:1px solid rgba(248,81,73,.30);
  color:#F85149;
  padding:11px 14px;
  border-radius:8px;
  font-size:13px;
  margin-bottom:14px;
  display:none;
  line-height:1.45;
}
.err.show{display:block;}

.ok{
  background:rgba(38,198,218,.10);
  border:1px solid rgba(38,198,218,.30);
  color:#26C6DA;
  padding:11px 14px;
  border-radius:8px;
  font-size:13px;
  margin-bottom:14px;
  line-height:1.45;
}

.captcha-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.captcha-row img{
  height:48px;
  border-radius:6px;
  background:#FFF;
  padding:2px 6px;
  flex:1;
  object-fit:contain;
  min-width:0;
}
#captchaReload{
  width:44px;height:48px;
  background:#0D1117;
  border:1px solid #30363D;
  color:#8B949E;
  border-radius:6px;
  font-size:20px;
  cursor:pointer;
  flex-shrink:0;
  transition:border-color .15s, color .15s;
  font-family:inherit;
  padding:0;
}
#captchaReload:hover{color:#F0F6FC;border-color:#8B949E;}

.footer{
  text-align:center;
  font-size:11px;
  color:#6E7681;
  margin-top:18px;
  letter-spacing:.04em;
}
.footer a{color:#26C6DA;text-decoration:none;}
.footer a:hover{text-decoration:underline;}

/* ==========  OTP  ========== */
.otp-row{
  display:flex;
  gap:10px;
  justify-content:center;
  margin:12px 0 18px;
}
.otp-cell{
  width:46px;height:54px;
  text-align:center;
  font-size:24px;
  font-weight:700;
  color:#F0F6FC;
  background:#0D1117;
  border:1px solid #30363D;
  border-radius:8px;
  padding:0;
  font-family:'Menlo','Consolas',monospace;
}
.otp-cell:focus{border-color:#26C6DA;box-shadow:0 0 0 3px rgba(38,198,218,.15);}
.countdown{
  text-align:center;
  font-size:13px;
  color:#8B949E;
  margin-bottom:12px;
}
.countdown b{color:#26C6DA;font-family:'Menlo','Consolas',monospace;}
.countdown.expired{color:#F85149;}
.countdown.expired b{color:#F85149;}

.resend-link{
  display:block;
  text-align:center;
  font-size:13px;
  color:#26C6DA;
  text-decoration:none;
  padding:8px;
  margin-bottom:8px;
}
.resend-link:hover{text-decoration:underline;}
.resend-link.disabled{color:#6E7681;pointer-events:none;}

/* ==========  PORTAL INTERNO  ========== */
body.lc-app{
  background:#0D1117;
  color:#F0F6FC;
  min-height:100vh;
  padding-top:60px;
}
.topbar{
  position:fixed;
  top:0;left:0;right:0;
  height:60px;
  background:#161B22;
  border-bottom:1px solid #21262D;
  display:flex;
  align-items:center;
  padding:0 24px;
  z-index:10;
}
.topbar .brand{margin-bottom:0;}
.topbar .brand img{width:36px;height:36px;border-radius:8px;}
.topbar .brand-nm{font-size:16px;}
.topbar .brand-sw{font-size:10px;}
.topbar-empresa{
  flex:1;
  margin-left:24px;
  padding-left:24px;
  border-left:1px solid #21262D;
}
.topbar-empresa-nom{
  font-size:14px;
  font-weight:700;
  color:#F0F6FC;
  line-height:1.2;
}
.topbar-empresa-cuit{
  font-size:11px;
  color:#8B949E;
  letter-spacing:.04em;
  margin-top:2px;
}
.topbar-user{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  color:#8B949E;
}
.topbar-logout{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  background:transparent;
  color:#8B949E;
  border:1px solid #30363D;
  border-radius:6px;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
}
.topbar-logout:hover{color:#F85149;border-color:rgba(248,81,73,.5);}

.app-content{
  max-width:1280px;
  margin:0 auto;
  padding:24px;
}
.page-title{
  font-size:22px;
  font-weight:700;
  color:#F0F6FC;
  margin-bottom:6px;
  letter-spacing:-.01em;
}
.page-desc{
  font-size:14px;
  color:#8B949E;
  margin-bottom:24px;
}

/* Stats bar */
.stats-bar{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  margin-bottom:24px;
}
.stat-tile{
  background:#161B22;
  border:1px solid #21262D;
  border-radius:10px;
  padding:14px 18px;
}
.stat-tile-val{
  font-size:24px;
  font-weight:800;
  color:#F0F6FC;
  letter-spacing:-.02em;
  line-height:1;
}
.stat-tile.cyan .stat-tile-val{color:#26C6DA;}
.stat-tile.green .stat-tile-val{color:#16C784;}
.stat-tile.amber .stat-tile-val{color:#F0A500;}
.stat-tile.red   .stat-tile-val{color:#F85149;}
.stat-tile-lbl{
  font-size:11px;
  color:#8B949E;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-top:6px;
}

/* Filtros */
.filters{
  background:#161B22;
  border:1px solid #21262D;
  border-radius:10px;
  padding:18px 20px;
  margin-bottom:18px;
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1fr 1fr auto;
  gap:12px;
  align-items:end;
}
.filters label{margin-bottom:4px;}
.filters input, .filters select{padding:9px 12px;font-size:13px;}
.btn-filter{
  padding:9px 18px;
  background:#26C6DA;
  color:#0D1117;
  border:0;
  border-radius:6px;
  font-weight:700;
  font-size:13px;
  cursor:pointer;
  font-family:inherit;
  height:38px;
}
.btn-filter:hover{filter:brightness(1.08);}

/* Tabla de carpetas */
.tbl-wrap{
  background:#161B22;
  border:1px solid #21262D;
  border-radius:10px;
  overflow:hidden;
}
.tbl{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.tbl thead th{
  background:#0D1117;
  color:#8B949E;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:11px;
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid #21262D;
}
.tbl tbody td{
  padding:14px;
  border-bottom:1px solid #21262D;
  color:#C9D1D9;
  vertical-align:middle;
}
.tbl tbody tr:last-child td{border-bottom:0;}
.tbl tbody tr:hover{background:rgba(38,198,218,.04);}
.tbl .nom{font-weight:700;color:#F0F6FC;}
.tbl .cuil{font-family:'Menlo','Consolas',monospace;font-size:12px;color:#8B949E;}
.tbl .fec{font-family:'Menlo','Consolas',monospace;font-size:12px;}

.badge{
  display:inline-block;
  font-size:11px;
  font-weight:700;
  padding:3px 10px;
  border-radius:5px;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.badge.apto    { background:rgba(22,199,132,.14);  color:#16C784; border:1px solid rgba(22,199,132,.30); }
.badge.aptor   { background:rgba(240,165,0,.14);   color:#F0A500; border:1px solid rgba(240,165,0,.30); }
.badge.noapto  { background:rgba(248,81,73,.14);   color:#F85149; border:1px solid rgba(248,81,73,.30); }
.badge.obs     { background:rgba(38,198,218,.14);  color:#26C6DA; border:1px solid rgba(38,198,218,.30); }
.badge.pend    { background:rgba(139,148,158,.14); color:#8B949E; border:1px solid rgba(139,148,158,.30); }
.badge.examen  { background:rgba(56,139,253,.10);  color:#79B8FF; border:1px solid rgba(56,139,253,.25); padding:2px 8px;font-size:10px; }

.btn-pdf{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  background:rgba(38,198,218,.10);
  color:#26C6DA;
  border:1px solid rgba(38,198,218,.4);
  border-radius:6px;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  font-family:inherit;
}
.btn-pdf:hover{background:rgba(38,198,218,.18);color:#26C6DA;}
.btn-pdf.old{
  background:transparent;
  color:#8B949E;
  border-color:#30363D;
}
.btn-pdf.old:hover{color:#F0F6FC;border-color:#8B949E;background:transparent;}

/* Modal carpeta antigua */
.modal-bg{
  position:fixed;inset:0;
  background:rgba(0,0,0,.75);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:100;
  padding:24px;
}
.modal-bg.show{display:flex;}
.modal{
  background:#161B22;
  border:1px solid #21262D;
  border-radius:14px;
  padding:32px 28px 24px;
  max-width:460px;
  width:100%;
}
.modal h3{
  font-size:18px;
  font-weight:700;
  color:#F0F6FC;
  margin-bottom:10px;
  text-align:center;
}
.modal p{
  font-size:14px;
  color:#8B949E;
  line-height:1.6;
  margin-bottom:18px;
  text-align:center;
}
.modal-contact{
  background:#0D1117;
  border:1px solid #21262D;
  border-radius:8px;
  padding:14px;
  margin-bottom:18px;
  text-align:left;
}
.modal-contact-row{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color:#C9D1D9;
  padding:6px 0;
}
.modal-contact-row .ico{
  width:18px;
  text-align:center;
  color:#26C6DA;
}
.modal-contact-row b{color:#F0F6FC;font-weight:600;}

@media (max-width: 991px){
  .filters{grid-template-columns:1fr 1fr 1fr;}
  .stats-bar{grid-template-columns:repeat(3,1fr);}
}
@media (max-width: 640px){
  .filters{grid-template-columns:1fr;}
  .stats-bar{grid-template-columns:1fr 1fr;}
  .topbar-empresa{margin-left:12px;padding-left:12px;}
  .topbar-empresa-nom{font-size:13px;}
  .app-content{padding:16px;}
}
@media (max-width: 480px){
  .card{padding:28px 22px 22px;}
  .brand-nm{font-size:20px;}
  .field-row{grid-template-columns:1fr;}
}
