/* CS Tucuman · Final visual polish V32.8
   Solo espaciado, legibilidad, alineacion y responsive. */
:root{
  --cst-space-1:6px;
  --cst-space-2:10px;
  --cst-space-3:14px;
  --cst-space-4:18px;
  --cst-space-5:24px;
  --cst-space-6:32px;
  --cst-radius-sm:10px;
  --cst-radius-md:14px;
  --cst-radius-lg:18px;
}

html{scroll-padding-top:110px}
body{line-height:1.45;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
img{max-width:100%}

/* ---------- Sitio publico ---------- */
body:not(.admincs-v4-body) .wrap,
body:not(.admincs-v4-body) main.wrap{
  width:min(100% - 32px,1320px);
  margin-inline:auto;
}
body:not(.admincs-v4-body) main{min-width:0}
body:not(.admincs-v4-body) section + section{margin-top:clamp(14px,1.8vw,24px)}
body:not(.admincs-v4-body) .panel,
body:not(.admincs-v4-body) .card,
body:not(.admincs-v4-body) article{
  scroll-margin-top:120px;
}

.cst320-header{box-shadow:0 12px 35px rgba(0,0,0,.22)}
.cst320-top-inner{padding-inline:clamp(14px,2.4vw,30px)}
.cst320-actions{gap:10px}
.cst320-nav{gap:4px;padding:0 10px}
.cst320-nav>a{min-height:48px;padding-inline:14px}
.cst320-account-drop{padding:8px}
.cst320-account-drop a{min-height:42px;border-radius:9px;padding:0 11px}
.cst320-account-drop .label{padding:10px 10px 5px}

/* Formularios y tablas publicas */
body:not(.admincs-v4-body) input,
body:not(.admincs-v4-body) select,
body:not(.admincs-v4-body) textarea{
  min-height:42px;
}
body:not(.admincs-v4-body) textarea{min-height:110px}
body:not(.admincs-v4-body) .btn,
body:not(.admincs-v4-body) button.btn,
body:not(.admincs-v4-body) a.btn{min-height:40px;padding-inline:14px}
body:not(.admincs-v4-body) table th{line-height:1.25}
body:not(.admincs-v4-body) table td{line-height:1.42}

/* Barras de paneles compartidas */
.cst90-panelbar{
  gap:10px!important;
  margin:0 0 18px!important;
  padding:8px!important;
  border-radius:14px!important;
}
.cst90-panelbar>a{
  min-height:64px!important;
  padding:11px 14px!important;
  border-radius:10px!important;
  gap:10px!important;
}
.cst90-panelbar>a ion-icon{font-size:22px!important;flex:0 0 auto}
.cst90-panelbar>a b{font-size:13px!important;line-height:1.15}
.cst90-panelbar>a small{font-size:9px!important;line-height:1.35;margin-top:3px!important}
.cst90-suite-banner{
  margin-bottom:16px!important;
  padding:22px 24px!important;
  gap:20px!important;
  border-radius:16px!important;
}
.cst90-suite-banner h2{margin:5px 0 6px!important}
.cst90-suite-banner p{margin:0!important;line-height:1.55!important}
.cst90-suite-banner img{max-height:84px!important;width:auto!important;object-fit:contain}

/* ---------- CEO CONTROL ---------- */
#side{
  padding:18px 14px 24px!important;
  scrollbar-width:thin;
}
#side .brand{padding:8px 7px 18px!important;margin-bottom:3px}
#side .cat{margin:18px 10px 7px!important;font-size:9px!important}
#side .nav{
  min-height:44px!important;
  margin:3px 0!important;
  padding:0 11px!important;
  border-radius:9px!important;
  font-size:12px!important;
  gap:10px!important;
}
#side .nav ion-icon{font-size:18px!important}
#side + main{padding:26px 28px 40px!important}
#side + main>.top{margin-bottom:18px!important;padding-bottom:2px}
#side + main .title small{font-size:10px!important;margin-bottom:5px!important}
#side + main .title h2{font-size:31px!important;line-height:1.05}
#side + main .userchip{padding:9px 12px!important;font-size:11px!important}
#side + main .panel{margin-bottom:18px!important;border-radius:14px!important}
#side + main .ph{padding:15px 18px!important;min-height:54px}
#side + main .ph strong{font-size:18px!important}
#side + main .pb{padding:18px!important}
#side + main .grid2,#side + main .grid3{gap:14px!important}
#side + main label{font-size:10px!important;margin-bottom:6px!important;letter-spacing:.35px}
#side + main input,#side + main select,#side + main textarea{min-height:43px!important;padding:10px 12px!important;font-size:13px!important}
#side + main textarea{min-height:110px!important}
#side + main .btn{min-height:39px!important;padding:0 13px!important;font-size:11px!important;border-radius:8px!important}
#side + main .btn.sm{min-height:35px!important;padding:0 11px!important;font-size:10px!important}
#side + main .inline{gap:8px!important}
#side + main .table{border-radius:0 0 14px 14px}
#side + main table th{padding:12px 13px!important;font-size:9px!important;white-space:nowrap}
#side + main table td{padding:13px!important;font-size:12px!important;line-height:1.4}
#side + main .badge{padding:5px 8px!important;font-size:9px!important}
#side + main .stats{gap:14px!important;margin-bottom:18px!important}
#side + main .stat{padding:17px!important;border-radius:13px!important}
#side + main .stat strong{margin-top:10px!important;font-size:28px!important}
#side + main .stat span{font-size:9px!important}
#side + main .dashboard{gap:18px!important}
#side + main .quick{padding:13px!important;margin-bottom:9px!important}

/* Listas de cuentas / inscripciones */
.ceo-users-head{margin-bottom:16px!important;padding:22px 24px!important;gap:20px!important}
.ceo-user-list{padding:10px!important}
.ceo-user-row{gap:12px!important;padding:14px!important;margin-bottom:9px!important;border-radius:11px!important}
.ceo-user-row:last-child{margin-bottom:0!important}
.ceo-user-id b{font-size:14px!important}
.ceo-user-id small{font-size:9px!important;line-height:1.45}
.cst-editor-layout{gap:18px!important}
.cst-editor-side,.cst-editor-main{border-radius:14px!important}

/* ---------- STAFF CONTROL ---------- */
.staff-layout{grid-template-columns:245px minmax(0,1fr)!important}
.staff-layout>.side{
  padding:18px 14px 26px!important;
  overflow-y:auto;
  scrollbar-width:thin;
}
.staff-layout>.side .brand{padding:7px 7px 18px!important}
.staff-layout>.side .who{margin:14px 0!important;padding:13px!important}
.staff-layout>.side .nav-title{margin:17px 9px 6px!important;font-size:9px!important}
.staff-layout>.side a.nav{min-height:43px!important;padding:10px 11px!important;margin:3px 0!important;border-radius:9px!important;font-size:12px!important;line-height:1.25}
.staff-layout>main{padding:26px 28px 40px!important}
.staff-layout .head{margin-bottom:18px!important;padding-bottom:17px!important;gap:16px}
.staff-layout .head h1{font-size:33px!important}
.staff-layout .db{padding:9px 11px!important;font-size:8px!important}
.staff-layout .alert{margin-bottom:14px!important;padding:12px 14px!important;font-size:10px!important;line-height:1.45}
.staff-layout .staff-access{margin-bottom:16px!important;padding:15px 17px!important}
.staff-layout .staff-access b{font-size:19px!important}
.staff-layout .stats{gap:12px!important;margin-bottom:16px!important}
.staff-layout .stat{padding:16px!important}
.staff-layout .card{margin-bottom:16px!important;border-radius:14px!important}
.staff-layout .ch{padding:15px 17px!important;gap:12px}
.staff-layout .ch h2{font-size:21px!important}
.staff-layout .admin-list,.staff-layout .staff-pay-list{padding:10px!important}
.staff-layout .admin-row{gap:12px!important;padding:13px!important}
.staff-layout .admin-row b{font-size:11px!important}
.staff-layout .admin-row small{font-size:8px!important;line-height:1.4}
.staff-layout .btn{min-height:34px!important;padding:0 11px!important;font-size:9px!important}
.staff-layout .staff-hub{gap:12px!important;margin-bottom:17px!important}
.staff-layout .staff-hub a{min-height:104px!important;padding:17px!important;border-radius:13px!important}
.staff-layout .staff-pay-row{padding:13px!important;gap:12px!important}

/* ---------- ADMIN CS ---------- */
.admincs-v4-layout{grid-template-columns:270px minmax(0,1fr)!important}
.admincs-v4-sidebar{
  padding-bottom:28px!important;
  scrollbar-width:thin;
}
.admincs-v4-brand{padding:17px 16px!important}
.admincs-v4-user{margin:13px!important;padding:14px!important;border-radius:12px!important}
.admincs-v4-sidebar nav{padding:0 11px 18px!important}
.admincs-v4-sidebar nav>.nav-title{margin:18px 10px 7px!important}
.admincs-v4-sidebar nav>a{min-height:52px!important;margin:3px 0!important;padding:9px 11px!important;border-radius:10px!important;gap:10px!important}
.admincs-v4-sidebar nav>a ion-icon{font-size:20px!important}
.admincs-v4-sidebar nav>a b{font-size:12px!important}
.admincs-v4-sidebar nav>a small{font-size:9px!important;line-height:1.35!important;margin-top:2px!important}
.admincs-v4-main{padding:26px 28px 42px!important;min-width:0}
.admincs-v4-head{margin-bottom:18px!important;padding-bottom:16px!important;gap:16px}
.admincs-v4-head h1{line-height:1.05!important}
.admincs-v4-main section{scroll-margin-top:20px}
.admincs-v4-main .ac4-card,
.admincs-v4-main .cstfull-card,
.admincs-v4-main .panel{margin-bottom:16px!important;border-radius:14px!important}
.admincs-v4-main .ac4-btn{min-height:38px!important;padding:0 13px!important}
.admincs-v4-main input,.admincs-v4-main select,.admincs-v4-main textarea{min-height:42px!important}
.admincs-v4-main table th{padding:11px 12px!important;white-space:nowrap}
.admincs-v4-main table td{padding:12px!important;line-height:1.4}

/* ---------- Modulo Publico R20 ---------- */
.ap60-layout{gap:18px!important}
.ap60-main{padding:26px 28px 40px!important}
.ap60-top{margin-bottom:18px!important;gap:18px!important}
.ap60-card{margin-bottom:16px!important;border-radius:14px!important}

/* ---------- Mobile / tablet ---------- */
@media(max-width:1100px){
  .cst90-panelbar{overflow-x:auto;scrollbar-width:none;justify-content:flex-start!important}
  .cst90-panelbar::-webkit-scrollbar{display:none}
  .cst90-panelbar>a{min-width:210px;flex:0 0 auto}
  #side + main,.staff-layout>main,.admincs-v4-main,.ap60-main{padding-inline:20px!important}
}

@media(max-width:760px){
  :root{--cst-space-5:20px;--cst-space-6:26px}
  html{scroll-padding-top:84px}
  body:not(.admincs-v4-body) .wrap,
  body:not(.admincs-v4-body) main.wrap{width:min(100% - 24px,1320px)}
  body:not(.admincs-v4-body) section + section{margin-top:14px}

  .cst320-top-inner{padding-inline:12px!important}
  .cst320-actions{gap:7px!important}
  .cst320-nav>a{min-height:46px}
  .cst90-suite-banner{padding:18px!important;margin-bottom:13px!important}
  .cst90-suite-banner img{display:none!important}
  .cst90-panelbar{margin-bottom:14px!important;padding:6px!important;gap:7px!important}
  .cst90-panelbar>a{min-width:190px!important;min-height:58px!important;padding:10px 12px!important}

  #side + main{padding:16px 13px 30px!important}
  #side + main>.top{margin-bottom:14px!important}
  #side + main .title h2{font-size:27px!important}
  #side + main .panel{margin-bottom:13px!important}
  #side + main .ph{padding:13px 14px!important;min-height:50px}
  #side + main .ph strong{font-size:17px!important}
  #side + main .pb{padding:14px!important}
  #side + main .stats{gap:9px!important;margin-bottom:13px!important}
  #side + main .stat{padding:13px!important}
  #side + main table th{padding:10px!important}
  #side + main table td{padding:11px 10px!important}
  .ceo-users-head{padding:17px!important;gap:12px!important}
  .ceo-user-row{padding:12px!important;gap:10px!important}

  .staff-layout{display:block!important}
  .staff-layout>.side{position:relative!important;height:auto!important;padding:13px!important;border-right:0!important;border-bottom:1px solid var(--line)!important}
  .staff-layout>.side .who{margin:10px 0!important}
  .staff-layout>.side .nav-title{margin-top:13px!important}
  .staff-layout>.side a.nav{min-height:41px!important}
  .staff-layout>main{padding:16px 13px 30px!important}
  .staff-layout .head{margin-bottom:14px!important;padding-bottom:13px!important}
  .staff-layout .head h1{font-size:28px!important}
  .staff-layout .stats{gap:9px!important;margin-bottom:13px!important}
  .staff-layout .card{margin-bottom:13px!important}
  .staff-layout .ch{padding:13px 14px!important}
  .staff-layout .admin-list,.staff-layout .staff-pay-list{padding:7px!important}
  .staff-layout .staff-hub{gap:9px!important;margin-bottom:13px!important}
  .staff-layout .staff-hub a{min-height:90px!important;padding:14px!important}

  .admincs-v4-layout{display:block!important}
  .admincs-v4-main{padding:16px 13px 32px!important}
  .admincs-v4-head{margin-bottom:14px!important;padding-bottom:13px!important}
  .admincs-v4-main .ac4-card,.admincs-v4-main .cstfull-card,.admincs-v4-main .panel{margin-bottom:13px!important}

  .ap60-main{padding:16px 13px 30px!important}
}

@media(max-width:480px){
  body:not(.admincs-v4-body) .wrap,
  body:not(.admincs-v4-body) main.wrap{width:min(100% - 18px,1320px)}
  .cst90-panelbar>a{min-width:175px!important}
  #side + main,.staff-layout>main,.admincs-v4-main,.ap60-main{padding-inline:9px!important}
  #side + main .pb{padding:12px!important}
  #side + main .ph{padding-inline:12px!important}
}

/* =========================================================
   CST V32.9 — corrección de ancho real del CEO + Inscripciones
   ========================================================= */

/* El layout ya usa grid; no debe sumar otro margin-left al main. */
body.ceo-master-body .app{
  display:grid!important;
  grid-template-columns:232px minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
}
body.ceo-master-body #side{
  width:232px!important;
  min-width:232px!important;
}
body.ceo-master-body #side + main{
  margin-left:0!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.ceo-master-body #side + main > *{
  max-width:none!important;
}

/* Inscripciones: en desktop entra completa sin cortar Acciones. */
@media (min-width:901px){
  body.ceo-master-body .cst-inscripciones-panel{
    width:100%!important;
    max-width:none!important;
    overflow:hidden!important;
  }
  body.ceo-master-body .cst-inscripciones-panel .table{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  body.ceo-master-body .cst-inscripciones-panel table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:auto!important;
  }
  body.ceo-master-body .cst-inscripciones-panel th,
  body.ceo-master-body .cst-inscripciones-panel td{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(1),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(1){width:8%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(2),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(2){width:13%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(3),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(3){width:21%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(4),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(4){width:12%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(5),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(5){width:11%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(6),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(6){width:12%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(7),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(7){width:10%!important}
  body.ceo-master-body .cst-inscripciones-panel th:nth-child(8),
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8){
    width:150px!important;
    min-width:150px!important;
  }
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8) form{
    width:100%!important;
    margin:0 0 6px!important;
  }
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8) form:last-child{
    margin-bottom:0!important;
  }
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8) .inline{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8) select,
  body.ceo-master-body .cst-inscripciones-panel td:nth-child(8) .btn{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
}

/* Tablet: sidebar un poco más compacto, contenido siempre flexible. */
@media (min-width:761px) and (max-width:1100px){
  body.ceo-master-body .app{grid-template-columns:210px minmax(0,1fr)!important}
  body.ceo-master-body #side{width:210px!important;min-width:210px!important}
  body.ceo-master-body #side + main{margin-left:0!important;padding-inline:18px!important}
}

/* Móvil conserva drawer y tabla desplazable. */
@media (max-width:760px){
  body.ceo-master-body .app{display:block!important;width:100%!important}
  body.ceo-master-body #side{width:min(92vw,300px)!important;min-width:0!important}
  body.ceo-master-body #side + main{margin-left:0!important;width:100%!important;padding-inline:11px!important}
  body.ceo-master-body .cst-inscripciones-panel .table{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body.ceo-master-body .cst-inscripciones-panel table{min-width:900px!important;width:900px!important}
  body.ceo-master-body .cst-inscripciones-panel th,
  body.ceo-master-body .cst-inscripciones-panel td{white-space:normal!important}
}
