/* ACME Internal — hoja de estilos común
 * Portal v2.4.1
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #eef2f5;
  color: #2b2f33;
  font-family: 'Segoe UI', Roboto, Verdana, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

a { color: #27508f; text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: #5a4a8a; }

/* ---------- Cabecera superior ---------- */

.topbar {
  background: #1f3a68;
  color: #ffffff;
  border-bottom: 1px solid #15294a;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #ffffff;
}
.brand:hover { text-decoration: none; }
.brand .brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand .brand-tagline {
  font-size: 11px;
  color: #b9c6da;
  font-weight: 400;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: #d4dceb;
}
.topbar-meta .pill {
  display: inline-block;
  border: 1px solid #4a6796;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10.5px;
  color: #ffffff;
  background: #27508f;
}
.topbar-meta .sep { color: #4a6796; }
.topbar-meta .user { color: #ffffff; }
.topbar-meta .clock {
  font-variant-numeric: tabular-nums;
  font-family: Consolas, 'Courier New', monospace;
  color: #b9c6da;
}

/* ---------- Sub-nav de pestañas ---------- */

.subnav {
  background: #27508f;
  border-bottom: 1px solid #15294a;
}
.subnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 8px;
  display: flex;
  gap: 0;
}
.subnav a {
  display: block;
  padding: 9px 14px;
  color: #e4ecf8;
  font-size: 13px;
  border-right: 1px solid #1f3a68;
}
.subnav a:hover {
  background: #1f3a68;
  text-decoration: none;
  color: #ffffff;
}
.subnav a.active {
  background: #eef2f5;
  color: #1f3a68;
  font-weight: 600;
}

/* ---------- Migas de pan ---------- */

.crumbs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 18px 0;
  font-size: 11.5px;
  color: #6d7682;
}
.crumbs a { color: #27508f; }
.crumbs .sep { margin: 0 5px; color: #c8d1da; }

/* ---------- Contenedor de contenido ---------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px 30px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f3a68;
  margin: 6px 0 4px;
  border-bottom: 1px solid #c8d1da;
  padding-bottom: 6px;
}
.page-subtitle {
  color: #6d7682;
  font-size: 12px;
  margin: 0 0 14px;
}

/* ---------- Banner / avisos ---------- */

.notice {
  border: 1px solid #e0b85a;
  background: #fff3cd;
  padding: 8px 12px;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #6b5012;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notice .notice-tag {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  background: #f0c36d;
  color: #4a3408;
  padding: 1px 6px;
  border-radius: 2px;
  flex-shrink: 0;
}
.notice-info {
  border-color: #c8d1da;
  background: #f4f7fa;
  color: #2b2f33;
}
.notice-info .notice-tag { background: #6d7682; color: #ffffff; }

.notice-error {
  border-color: #c0392b;
  background: #fbe9e7;
  color: #7a1f15;
}
.notice-error .notice-tag { background: #c0392b; color: #ffffff; }

/* ---------- Layout de dos columnas ---------- */

.cols {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}
@media (max-width: 800px) {
  .cols { grid-template-columns: 1fr; }
}

/* ---------- Paneles ---------- */

.panel {
  background: #ffffff;
  border: 1px solid #c8d1da;
  margin-bottom: 14px;
}
.panel-head {
  background: #f4f7fa;
  border-bottom: 1px solid #c8d1da;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f3a68;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-head .panel-meta {
  font-size: 11px;
  color: #6d7682;
  font-weight: 400;
}
.panel-body { padding: 10px 12px; }
.panel-body.tight { padding: 0; }

/* ---------- Listados ---------- */

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-list li {
  border-bottom: 1px dotted #c8d1da;
  padding: 7px 0;
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.news-list li:last-child { border-bottom: 0; }
.news-list .date {
  color: #6d7682;
  font-variant-numeric: tabular-nums;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11px;
  flex-shrink: 0;
  width: 78px;
}
.news-list .dept {
  display: inline-block;
  font-size: 10px;
  background: #eef2f5;
  border: 1px solid #c8d1da;
  color: #6d7682;
  padding: 0 4px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: #c8d1da;
  border: 1px solid #c8d1da;
}
.quicklinks a {
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f3a68;
  font-size: 12.5px;
}
.quicklinks a:hover {
  background: #f4f7fa;
  text-decoration: none;
}
.quicklinks .ic {
  width: 16px;
  height: 16px;
  color: #6d7682;
  flex-shrink: 0;
}

.kv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.kv-list li {
  padding: 5px 0;
  border-bottom: 1px dotted #c8d1da;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.kv-list li:last-child { border-bottom: 0; }
.kv-list .label { color: #2b2f33; }
.kv-list .val {
  color: #6d7682;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11.5px;
}

/* ---------- Tablas densas ---------- */

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 12px;
}
table.grid th,
table.grid td {
  border-bottom: 1px solid #e3e8ee;
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}
table.grid thead th {
  background: #f4f7fa;
  border-bottom: 1px solid #c8d1da;
  font-weight: 600;
  color: #1f3a68;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 8px;
}
table.grid tbody tr:nth-child(even) { background: #fafbfc; }
table.grid tbody tr:hover { background: #f4f7fa; }
table.grid td.num,
table.grid th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11.5px;
  color: #6d7682;
  width: 1%;
  white-space: nowrap;
}
table.grid td.mono {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11.5px;
  color: #6d7682;
}

/* Clasificaciones */
.cls {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border: 1px solid;
  border-radius: 2px;
  font-weight: 600;
}
.cls-pub { color: #2c6e3b; border-color: #9ec6a8; background: #eaf4ec; }
.cls-int { color: #1f3a68; border-color: #c8d1da; background: #eef2f5; }
.cls-res { color: #8a5a14; border-color: #e0b85a; background: #fff3cd; }
.cls-con { color: #c0392b; border-color: #c0392b; background: #fbe9e7; }

/* ---------- Buscador / formulario ---------- */

.search-bar {
  background: #f4f7fa;
  border: 1px solid #c8d1da;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.search-bar label {
  font-size: 11.5px;
  color: #6d7682;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.search-bar input[type=text],
.search-bar input[type=search],
.search-bar select {
  font-family: inherit;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid #c8d1da;
  background: #ffffff;
  color: #2b2f33;
  border-radius: 1px;
}
.search-bar input[type=text],
.search-bar input[type=search] { min-width: 240px; }
.search-bar .hint {
  font-size: 11px;
  color: #6d7682;
  margin-left: auto;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid #1f3a68;
  background: #27508f;
  color: #ffffff;
  cursor: pointer;
  border-radius: 1px;
  line-height: 1.4;
}
.btn:hover { background: #1f3a68; }
.btn.btn-sec {
  background: #ffffff;
  color: #1f3a68;
  border-color: #c8d1da;
}
.btn.btn-sec:hover { background: #f4f7fa; }

/* ---------- Formulario de login ---------- */

.login-wrap {
  max-width: 380px;
  margin: 36px auto;
  background: #ffffff;
  border: 1px solid #c8d1da;
}
.login-wrap .panel-head { font-size: 13.5px; padding: 8px 12px; }
.login-form { padding: 14px 16px 16px; }
.login-form .field {
  display: block;
  margin-bottom: 10px;
}
.login-form .field label {
  display: block;
  font-size: 11.5px;
  color: #6d7682;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}
.login-form .field input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 5px 7px;
  border: 1px solid #c8d1da;
  background: #ffffff;
  border-radius: 1px;
}
.login-form .field input:focus {
  outline: none;
  border-color: #27508f;
  background: #f8fafc;
}
.login-form .actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.login-form .helper {
  font-size: 11px;
  color: #6d7682;
}
.login-form .err {
  background: #fbe9e7;
  border: 1px solid #c0392b;
  color: #7a1f15;
  padding: 5px 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.policy-note {
  font-size: 11px;
  color: #6d7682;
  background: #f4f7fa;
  border-top: 1px solid #c8d1da;
  padding: 8px 12px;
  line-height: 1.5;
}

/* ---------- Leyenda / chips ---------- */

.legend {
  font-size: 11px;
  color: #6d7682;
  padding: 6px 10px;
  background: #f4f7fa;
  border-top: 1px solid #c8d1da;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.legend .cls { font-size: 9.5px; }

/* ---------- Resultados de búsqueda ---------- */

.results-summary {
  background: #f4f7fa;
  border: 1px solid #c8d1da;
  padding: 6px 10px;
  font-size: 12px;
  color: #2b2f33;
  margin-bottom: 10px;
}
.results-summary .q {
  font-family: Consolas, 'Courier New', monospace;
  background: #ffffff;
  border: 1px solid #c8d1da;
  padding: 0 4px;
  color: #1f3a68;
}

.result-item {
  border-bottom: 1px solid #e3e8ee;
  padding: 9px 0;
}
.result-item:last-child { border-bottom: 0; }
.result-item h3 {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 600;
}
.result-item h3 a { color: #27508f; }
.result-item .url {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11px;
  color: #2c6e3b;
  margin-bottom: 3px;
}
.result-item .snippet {
  font-size: 12px;
  color: #2b2f33;
  margin: 0;
}
.result-item .meta {
  font-size: 11px;
  color: #6d7682;
  margin-top: 3px;
}

/* ---------- Visor de fichero (preview inline) ---------- */

.file-preview {
  background: #1e2227;
  color: #d6dde6;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 12px;
  margin: 0;
  border-top: 1px solid #c8d1da;
  max-height: 360px;
  overflow: auto;
  white-space: pre;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid #c8d1da;
  background: #e3e8ee;
  color: #6d7682;
  font-size: 11px;
  padding: 10px 0;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer a { color: #27508f; }
.footer .build {
  font-family: Consolas, 'Courier New', monospace;
  color: #8b949e;
}

/* ---------- Utilidades ---------- */

.muted { color: #6d7682; }
.mono { font-family: Consolas, 'Courier New', monospace; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.small { font-size: 11px; }

hr.sep {
  border: 0;
  border-top: 1px solid #c8d1da;
  margin: 14px 0;
}

/* Responsive básico */
@media (max-width: 640px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; padding: 8px 12px; gap: 4px; min-height: 0; }
  .topbar-meta { font-size: 11px; gap: 8px; flex-wrap: wrap; }
  .subnav-inner { overflow-x: auto; }
  .subnav a { white-space: nowrap; }
  .container, .crumbs, .footer-inner { padding-left: 12px; padding-right: 12px; }
  .search-bar input[type=text],
  .search-bar input[type=search] { min-width: 0; width: 100%; }
  table.grid { font-size: 11.5px; }
  table.grid th, table.grid td { padding: 4px 5px; }
}
