/* =========================================================
   OCS 2.3 - Estilo mejorado sin tocar la estructura de columnas
   Inspirado en jornadainnovacuidadosgranada.es
   ========================================================= */

:root{
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-soft: #f7fbfb;
  --surface-alt: #edf5f6;
  --text: #24363c;
  --title: #17343d;
  --muted: #6a7c82;
  --primary: #0c6d73;
  --primary-dark: #084f54;
  --primary-soft: #dceff1;
  --border: #d7e2e5;
  --border-strong: #c3d2d6;
  --success: #2f7d32;
  --warning: #946c11;
  --danger: #b13d3d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(18, 43, 56, 0.05);
  --shadow-md: 0 10px 28px rgba(18, 43, 56, 0.08);
}

/* Base */
body{
  background: linear-gradient(180deg, #eef5f6 0%, #f7fafa 280px, #f3f7f8 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a{
  color: var(--primary);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a:hover,
a:focus{
  color: var(--primary-dark);
  text-decoration: underline;
}

h1,h2,h3,h4,h5,h6{
  color: var(--title);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.2;
}

h1{
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h2{
  font-size: 1.5rem;
}

h3{
  font-size: 1.1rem;
}

p, li, td, th, label, input, select, textarea{
  font-size: 0.98rem;
}

/* Cabecera */
#header,
div#header{
  background: linear-gradient(135deg, #0c6d73 0%, #124a5f 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 10px 30px rgba(10, 55, 70, 0.18);
  padding-top: 16px;
  padding-bottom: 16px;
}

#header h1,
#header h2,
#header h3,
div#header h1,
div#header h2,
div#header h3{
  color: #fff !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#header a,
div#header a{
  color: #eaf8f8;
}

#header a:hover,
div#header a:hover{
  color: #ffffff;
  text-decoration: none;
}

/* Breadcrumb */
#breadcrumb,
.breadcrumb{
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  margin-bottom: 18px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

/* Contenido principal */
#content,
div#content{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 22px 24px;
}

/* Sidebar: solo maquillaje */
#leftSidebar .block,
#rightSidebar .block,
#sidebar .block,
.block{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 14px;
  margin-bottom: 16px;
}

#leftSidebar .block h3,
#rightSidebar .block h3,
#sidebar .block h3,
.block h3{
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--title);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Listas laterales */
#leftSidebar ul,
#rightSidebar ul,
#sidebar ul{
  margin: 0;
  padding-left: 1rem;
}

#leftSidebar li,
#rightSidebar li,
#sidebar li{
  margin-bottom: .45rem;
}

#leftSidebar a,
#rightSidebar a,
#sidebar a{
  color: var(--text);
}

#leftSidebar a:hover,
#rightSidebar a:hover,
#sidebar a:hover{
  color: var(--primary);
}

/* Menú principal del sitio dentro del lateral */
#leftSidebar .block ul li a,
#rightSidebar .block ul li a,
#sidebar .block ul li a{
  display: inline;
  font-weight: 500;
}

/* Título principal de la sección */
#content h2:first-child,
#content h1:first-child,
div#content h2:first-child,
div#content h1:first-child{
  margin-top: 0;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Navegación de pasos del setup */
#content > ul:first-of-type,
#content > ol:first-of-type,
div#content > ul:first-of-type,
div#content > ol:first-of-type{
  list-style: none;
  margin: 0 0 22px 0;
  padding: 0;
}

#content > ul:first-of-type li,
#content > ol:first-of-type li,
div#content > ul:first-of-type li,
div#content > ol:first-of-type li{
  display: inline-block;
  margin: 0 8px 10px 0;
}

#content > ul:first-of-type li a,
#content > ol:first-of-type li a,
div#content > ul:first-of-type li a,
div#content > ol:first-of-type li a{
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--title);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}

#content > ul:first-of-type li a:hover,
#content > ol:first-of-type li a:hover,
div#content > ul:first-of-type li a:hover,
div#content > ol:first-of-type li a:hover{
  background: var(--primary-soft);
  border-color: #b8d5d9;
  color: var(--primary-dark);
  text-decoration: none;
}

/* Formularios */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
select,
textarea{
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.02);
}

input:focus,
select:focus,
textarea:focus{
  outline: none;
  border-color: #7fb9bf;
  box-shadow: 0 0 0 4px rgba(12,109,115,.12);
}

/* Botones */
input[type="submit"],
input[type="button"],
input[type="reset"],
button,
a.button,
a.btn{
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: linear-gradient(180deg, #11818a 0%, #0c6d73 100%);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 14px rgba(12,109,115,.18);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
button:hover,
a.button:hover,
a.btn:hover{
  background: linear-gradient(180deg, #0f737a 0%, #084f54 100%);
  box-shadow: 0 8px 18px rgba(12,109,115,.22);
  transform: translateY(-1px);
}

/* Botón secundario */
input[type="reset"]{
  background: #fff;
  color: var(--primary) !important;
  box-shadow: none;
}

/* Tablas */
table{
  border-collapse: collapse;
  width: 100%;
}

table.listing,
table.data,
table.info{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table th{
  background: linear-gradient(180deg, #f4f9f9 0%, #eaf3f4 100%);
  color: var(--title);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

table td{
  padding: 12px 14px;
  border-bottom: 1px solid #e8eff1;
}

table tr:nth-child(even) td{
  background: #fcfefe;
}

table tr:hover td{
  background: #f4fbfb;
}

/* Mensajes */
.success,
.notify{
  background: linear-gradient(180deg, #eff9f0 0%, #e8f6ea 100%);
  border: 1px solid #cfe6d1;
  color: var(--success);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.warning{
  background: linear-gradient(180deg, #fff9eb 0%, #fff4d9 100%);
  border: 1px solid #ecd9a6;
  color: var(--warning);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.error,
.errorMessage{
  background: linear-gradient(180deg, #fff3f3 0%, #ffecec 100%);
  border: 1px solid #f0c9c9;
  color: var(--danger);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

/* Buscador lateral */
#leftSidebar input[type="text"],
#rightSidebar input[type="text"],
#sidebar input[type="text"],
#leftSidebar select,
#rightSidebar select,
#sidebar select{
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Enlaces de pasos anterior/siguiente */
a[href*="setup/3"],
a[href*="setup/5"]{
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

/* Footer */
#footer,
div#footer{
  color: var(--muted);
  font-size: .95rem;
  padding-top: 18px;
  padding-bottom: 24px;
}

/* Responsive sin tocar columnas base del tema */
@media (max-width: 768px){
  #content,
  div#content{
    padding: 18px 16px;
    border-radius: 14px;
  }

  #content > ul:first-of-type li,
  #content > ol:first-of-type li,
  div#content > ul:first-of-type li,
  div#content > ol:first-of-type li{
    display: block;
    margin-right: 0;
  }

  #content > ul:first-of-type li a,
  #content > ol:first-of-type li a,
  div#content > ul:first-of-type li a,
  div#content > ol:first-of-type li a{
    display: block;
  }

  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  button,
  a.button,
  a.btn{
    width: 100%;
    text-align: center;
  }
}

/* =========================================
   AJUSTE DE TIPOGRAFÍA DEL MENÚ / SIDEBAR
   ========================================= */

/* Tamaño general más equilibrado */
body{
  font-size: 15px;
  line-height: 1.5;
}

/* Sidebar completo */
#leftSidebar,
#rightSidebar,
#sidebar,
#leftSidebar .block,
#rightSidebar .block,
#sidebar .block{
  font-size: 14px;
  line-height: 1.45;
}

/* Títulos de bloque: visibles pero contenidos */
#leftSidebar .block h3,
#rightSidebar .block h3,
#sidebar .block h3,
.block h3{
  font-size: 12px !important;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Texto y enlaces del lateral */
#leftSidebar li,
#rightSidebar li,
#sidebar li,
#leftSidebar a,
#rightSidebar a,
#sidebar a{
  font-size: 14px !important;
  line-height: 1.45;
  font-weight: 400;
}

/* Menú principal en el lateral: quitar exceso de protagonismo */
#leftSidebar .block ul li a,
#rightSidebar .block ul li a,
#sidebar .block ul li a{
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0;
}

/* Buscador lateral */
#leftSidebar input[type="text"],
#rightSidebar input[type="text"],
#sidebar input[type="text"],
#leftSidebar select,
#rightSidebar select,
#sidebar select,
#leftSidebar input[type="submit"],
#rightSidebar input[type="submit"],
#sidebar input[type="submit"]{
  font-size: 14px !important;
}

/* Breadcrumb algo más pequeño */
#breadcrumb,
.breadcrumb{
  font-size: 13px;
}

/* Título principal del contenido */
#content h1,
#content h2,
div#content h1,
div#content h2{
  font-size: 28px;
  line-height: 1.2;
}

/* Pestañas de pasos */
#content > ul:first-of-type li a,
#content > ol:first-of-type li a,
div#content > ul:first-of-type li a,
div#content > ol:first-of-type li a{
  font-size: 13px !important;
  font-weight: 600;
}

/* Texto del contenido */
#content,
#content p,
#content li,
#content td,
#content th,
div#content,
div#content p,
div#content li,
div#content td,
div#content th{
  font-size: 15px;
  line-height: 1.55;
}

/* =========================================
   AJUSTE DE FORMULARIOS, BOTONES Y CAJONES
   OCS 2.3 manager/setup
   ========================================= */

/* Celdas y tablas del formulario */
#content table.data,
#content table.info,
div#content table.data,
div#content table.info{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#content table.data td,
#content table.data th,
#content table.info td,
#content table.info th,
div#content table.data td,
div#content table.data th,
div#content table.info td,
div#content table.info th{
  padding: 10px 12px;
  vertical-align: top;
}

/* Etiquetas de columnas */
#content table.data td:first-child,
#content table.info td:first-child,
div#content table.data td:first-child,
div#content table.info td:first-child{
  width: 28%;
  color: var(--title);
  font-weight: 600;
}

/* Campos de una línea */
#content input[type="text"],
#content input[type="password"],
#content input[type="email"],
#content input[type="file"],
#content select,
div#content input[type="text"],
div#content input[type="password"],
div#content input[type="email"],
div#content input[type="file"],
div#content select{
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.35;
  box-sizing: border-box;
}

/* Textareas normales */
#content textarea,
div#content textarea{
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
}

/* Focus */
#content input:focus,
#content select:focus,
#content textarea:focus,
div#content input:focus,
div#content select:focus,
div#content textarea:focus{
  outline: none;
  border-color: #7fb9bf;
  box-shadow: 0 0 0 4px rgba(12,109,115,.12);
}

/* Checkboxes y radios */
#content input[type="checkbox"],
#content input[type="radio"],
div#content input[type="checkbox"],
div#content input[type="radio"]{
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Filas de opciones */
#content table.data tr,
#content table.info tr,
div#content table.data tr,
div#content table.info tr{
  border-bottom: 1px solid #edf2f3;
}

#content table.data tr:last-child,
#content table.info tr:last-child,
div#content table.data tr:last-child,
div#content table.info tr:last-child{
  border-bottom: none;
}

/* Botones */
#content input[type="submit"],
#content input[type="button"],
#content input[type="reset"],
#content button,
div#content input[type="submit"],
div#content input[type="button"],
div#content input[type="reset"],
div#content button{
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  box-sizing: border-box;
  vertical-align: middle;
}

/* Separación entre botones seguidos */
#content input[type="submit"] + input,
#content input[type="button"] + input,
#content input[type="reset"] + input,
#content button + button,
div#content input[type="submit"] + input,
div#content input[type="button"] + input,
div#content input[type="reset"] + input,
div#content button + button{
  margin-left: 10px;
}

/* Bloques tipo editor enriquecido */
#content .mceLayout,
#content .mceEditor,
#content table.mceLayout,
div#content .mceLayout,
div#content .mceEditor,
div#content table.mceLayout{
  width: 100% !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: #fff;
}

/* Barra del editor */
#content .mceToolbar,
#content .mceStatusbar,
div#content .mceToolbar,
div#content .mceStatusbar{
  background: #f6f9fa !important;
}

/* Texto auxiliar */
#content small,
#content .instruct,
div#content small,
div#content .instruct{
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Títulos internos */
#content h3,
#content h4,
div#content h3,
div#content h4{
  margin-top: 22px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #edf2f3;
}

/* Ajuste final para móviles */
@media (max-width: 768px){
  #content table td:first-child,
  div#content table td:first-child{
    width: auto;
    display: block;
    padding-bottom: 6px;
  }

  #content table td,
  div#content table td{
    display: block;
    width: 100%;
  }

  #content input[type="submit"],
  #content input[type="button"],
  #content input[type="reset"],
  #content button,
  div#content input[type="submit"],
  div#content input[type="button"],
  div#content input[type="reset"],
  div#content button{
    width: 100%;
    margin: 8px 0 0 0;
  }

  #content input[type="submit"] + input,
  #content input[type="button"] + input,
  #content input[type="reset"] + input,
  div#content input[type="submit"] + input,
  div#content input[type="button"] + input,
  div#content input[type="reset"] + input{
    margin-left: 0;
  }
}


/* =========================================================
   TABLAS DE LISTADOS Y REVISIÓN — OCS 2.3
   No aplicar reglas de formularios a estas tablas.
   ========================================================= */
#content,
div#content {
  overflow-x: auto;
}

#content table.listing,
div#content table.listing {
  display: table !important;
  width: 1100px !important;
  min-width: 1100px !important;
  max-width: none !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

#content table.listing th,
#content table.listing td,
div#content table.listing th,
div#content table.listing td {
  display: table-cell !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 10px 12px !important;
  vertical-align: top !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

#content table.listing th,
div#content table.listing th {
  font-size: 12px !important;
  font-weight: 700 !important;
}

#content table.listing th:nth-child(1), #content table.listing td:nth-child(1),
div#content table.listing th:nth-child(1), div#content table.listing td:nth-child(1) { width: 42px !important; }
#content table.listing th:nth-child(2), #content table.listing td:nth-child(2),
div#content table.listing th:nth-child(2), div#content table.listing td:nth-child(2) { width: 70px !important; }
#content table.listing th:nth-child(3), #content table.listing td:nth-child(3),
div#content table.listing th:nth-child(3), div#content table.listing td:nth-child(3) { width: 85px !important; }
#content table.listing th:nth-child(4), #content table.listing td:nth-child(4),
div#content table.listing th:nth-child(4), div#content table.listing td:nth-child(4) { width: 105px !important; }
#content table.listing th:nth-child(5), #content table.listing td:nth-child(5),
div#content table.listing th:nth-child(5), div#content table.listing td:nth-child(5) { width: 120px !important; }
#content table.listing th:nth-child(6), #content table.listing td:nth-child(6),
div#content table.listing th:nth-child(6), div#content table.listing td:nth-child(6) { width: 150px !important; }
#content table.listing th:nth-child(7), #content table.listing td:nth-child(7),
div#content table.listing th:nth-child(7), div#content table.listing td:nth-child(7) { width: 150px !important; }
#content table.listing th:nth-child(8), #content table.listing td:nth-child(8),
div#content table.listing th:nth-child(8), div#content table.listing td:nth-child(8) { width: 135px !important; }
#content table.listing th:nth-child(9), #content table.listing td:nth-child(9),
div#content table.listing th:nth-child(9), div#content table.listing td:nth-child(9) { width: 85px !important; }
