/* Creático 19-nov-2026 · FCCaza: EDocman con UIkit (plantillas en templates/yootheme/html/com_edocman).
   Colores y fuentes del tema: verde #4d5a31, rojo #cf333b, gris #f7f7f7, Blinker (títulos) y Montserrat (botones). */
.ck-edoc { --ck-green: #4d5a31; --ck-green-dark: #3a4425; --ck-green-soft: #eef0e8; --ck-red: #cf333b; --ck-line: #e5e5e5; --ck-text: #2d2e33; --ck-muted: #6c6d74; --ck-bg: #f7f7f7; color: var(--ck-text); }
.ck-edoc *, .ck-edoc *::before, .ck-edoc *::after { box-sizing: border-box; }

/* ---- cabecera de página ---- */
.ck-edoc-head { margin-bottom: 40px; }
.ck-edoc-head__title { margin: 0; }
.ck-edoc-head__intro { max-width: 760px; margin-top: 14px; color: var(--ck-muted); font-size: 18px; line-height: 1.55; }
.ck-edoc-head__intro > :last-child { margin-bottom: 0; }
.ck-edoc-head__tools { margin: 20px 0 0; }

/* ---- tarjetas de categoría ---- */
.ck-edoc-catgrid { margin-bottom: 0; padding: 0; list-style: none; }
.ck-edoc-catgrid--sub { margin-bottom: 40px; }
.ck-edoc-cat { display: flex !important; align-items: center; gap: 20px; padding: 26px 28px; color: var(--ck-text); text-decoration: none !important; border-left: 4px solid transparent; transition: box-shadow .15s ease-out, border-color .15s ease-out, transform .15s ease-out; }
.ck-edoc-cat:hover { color: var(--ck-text); border-left-color: var(--ck-green); box-shadow: 0 14px 25px rgba(0, 0, 0, .12); }
.ck-edoc-cat:focus-visible { outline: 2px solid var(--ck-green); outline-offset: 3px; }
.ck-edoc-cat__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: var(--ck-green); color: #fff; }
.ck-edoc-cat__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ck-edoc-cat__title { font-family: Blinker, sans-serif; font-size: 24px; line-height: 1.2; font-weight: 500; }
.ck-edoc-cat__count { font-family: Montserrat, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--ck-green); }
.ck-edoc-cat__desc { margin-top: 4px; color: var(--ck-muted); font-size: 15px; line-height: 1.45; }
.ck-edoc-cat__go { flex: none; color: var(--ck-green); transition: transform .15s ease-out; }
.ck-edoc-cat:hover .ck-edoc-cat__go { transform: translateX(4px); }

/* ---- barra: total, orden y vista ---- */
.ck-edoc-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding-bottom: 16px; border-bottom: 2px solid var(--ck-green); }
.ck-edoc-toolbar__count { margin: 0; font-family: Montserrat, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--ck-muted); }
.ck-edoc-toolbar__tools { display: flex; align-items: center; gap: 10px; }
.ck-edoc-select.uk-select { width: auto; min-width: 170px; height: 36px; border-color: var(--ck-line); background-color: #fff; font-size: 14px; }
.ck-edoc-select.uk-select:focus { border-color: var(--ck-green); }
.ck-edoc .uk-icon-button { width: 36px; height: 36px; border-radius: 0; background: var(--ck-bg); color: var(--ck-text); transition: background-color .1s, color .1s; }
.ck-edoc .uk-icon-button:hover, .ck-edoc .uk-icon-button:focus-visible { background: var(--ck-green); color: #fff; }
.ck-edoc-switch { margin: 0 0 0 6px !important; padding-left: 14px !important; border-left: 1px solid var(--ck-line); }
.ck-edoc-switch > li > a { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--ck-muted); }
.ck-edoc-switch > li > a:hover { color: var(--ck-green); }
.ck-edoc-switch > li.uk-active > a { background: var(--ck-green-soft); color: var(--ck-green); }

/* ---- documentos (lista) ---- */
.ck-edoc-docs { margin: 0; padding: 0; list-style: none; }
.ck-edoc-doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 22px 16px; border-bottom: 1px solid var(--ck-line); transition: background-color .1s ease-out; }
.ck-edoc-doc:hover { background: var(--ck-bg); }
.ck-edoc-doc__title { margin: 0; font-family: Blinker, sans-serif; font-size: 20px; line-height: 1.3; font-weight: 500; }
.ck-edoc-doc__title a { color: var(--ck-text); text-decoration: none; }
.ck-edoc-doc__title a:hover { color: var(--ck-green); }
.ck-edoc-doc__desc { margin: 8px 0 0; color: var(--ck-muted); font-size: 14px; line-height: 1.5; }
.ck-edoc-doc__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ck-edoc-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--ck-muted); font-size: 13px; }
.ck-edoc-meta > li { display: inline-flex; align-items: center; gap: 6px; }
.ck-edoc-meta [uk-icon] { color: var(--ck-green); }

/* icono de archivo con la extensión */
.ck-edoc-badge { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 50px; height: 60px; padding-top: 10px; background: #fff; border: 1px solid var(--ck-line); color: var(--ck-green); }
.ck-edoc-badge::after { content: ""; position: absolute; top: -1px; right: -1px; border-style: solid; border-width: 0 12px 12px 0; border-color: transparent var(--ck-bg) var(--ck-line) transparent; }
.ck-edoc-badge__ext { position: absolute; left: -1px; right: -1px; bottom: -1px; padding: 3px 0; background: var(--ck-red); color: #fff; font-family: Montserrat, sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-align: center; line-height: 1.2; }
.ck-edoc-badge--doc .ck-edoc-badge__ext, .ck-edoc-badge--docx .ck-edoc-badge__ext { background: #2f5d9e; }
.ck-edoc-badge--xls .ck-edoc-badge__ext, .ck-edoc-badge--xlsx .ck-edoc-badge__ext, .ck-edoc-badge--csv .ck-edoc-badge__ext { background: #2e7d4f; }
.ck-edoc-badge--jpg .ck-edoc-badge__ext, .ck-edoc-badge--png .ck-edoc-badge__ext, .ck-edoc-badge--zip .ck-edoc-badge__ext, .ck-edoc-badge--web .ck-edoc-badge__ext { background: var(--ck-green); }
.ck-edoc-badge--large { width: 72px; height: 88px; padding-top: 16px; }
.ck-edoc-badge--large .ck-edoc-badge__ext { padding: 5px 0; font-size: 12px; }

/* botones */
.ck-edoc-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.ck-edoc-btn.uk-button-default { background: #fff; border: 1px solid var(--ck-line); color: var(--ck-text); }
.ck-edoc-btn.uk-button-default:hover { border-color: var(--ck-green); color: var(--ck-green); background: #fff; }
.ck-edoc-btn.uk-button-primary:hover { background: var(--ck-green-dark); }
.ck-edoc-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.ck-edoc .uk-button:focus-visible, .ck-edoc a:focus-visible { outline: 2px solid var(--ck-green); outline-offset: 2px; }

/* ---- documentos (cuadrícula) ---- */
.ck-edoc-docs--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding-top: 24px; }
.ck-edoc-docs--grid .ck-edoc-doc { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: start; gap: 18px; padding: 24px; background: #fff; border: 1px solid var(--ck-line); box-shadow: 0 5px 15px rgba(0, 0, 0, .06); }
.ck-edoc-docs--grid .ck-edoc-doc:hover { background: #fff; box-shadow: 0 14px 25px rgba(0, 0, 0, .12); }
.ck-edoc-docs--grid .ck-edoc-doc__actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--ck-line); }
.ck-edoc-docs--grid .ck-edoc-doc__actions .ck-edoc-more:first-of-type { margin-left: auto; }

/* ---- vacío y paginación ---- */
.ck-edoc-empty { padding: 60px 20px; text-align: center; color: var(--ck-muted); background: var(--ck-bg); }
.ck-edoc-empty [uk-icon] { color: var(--ck-green); margin-bottom: 12px; }
.ck-edoc-empty p { margin: 0; font-size: 16px; }
.ck-edoc-pagination { margin-top: 40px; display: flex; justify-content: center; }
.ck-edoc-pagination .uk-pagination > * > * { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.ck-edoc-pagination .uk-pagination > .uk-active > * { background: var(--ck-green); color: #fff; }

/* ---- ficha del documento ---- */
.ck-edoc-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 24px; font-family: Montserrat, sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--ck-green); text-decoration: none; }
.ck-edoc-back:hover { color: var(--ck-green-dark); text-decoration: none; }
.ck-edoc-detail__head { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 2px solid var(--ck-green); }
.ck-edoc-detail__title { margin: 0; line-height: 1.15; }
.ck-edoc-detail__head .ck-edoc-meta { margin-top: 10px; font-size: 14px; }
.ck-edoc-detail__desc { margin-bottom: 30px; font-size: 17px; line-height: 1.6; }
.ck-edoc-detail__desc > :last-child { margin-bottom: 0; }
.ck-edoc-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 360px; padding: 50px 30px; background: var(--ck-bg); border: 1px dashed #cfd3c4; color: var(--ck-text); text-align: center; text-decoration: none !important; transition: background-color .15s ease-out, border-color .15s ease-out; }
.ck-edoc-cover:hover { background: var(--ck-green-soft); border-color: var(--ck-green); color: var(--ck-text); }
.ck-edoc-cover__title { max-width: 520px; font-family: Blinker, sans-serif; font-size: 22px; line-height: 1.3; }
.ck-edoc-cover .ck-edoc-badge--large { width: 96px; height: 118px; padding-top: 24px; }
.ck-edoc-panel { padding: 30px; border-top: 4px solid var(--ck-green); }
.ck-edoc-panel__actions { display: grid; gap: 10px; }
.ck-edoc-facts { margin: 26px 0 0; }
.ck-edoc-facts > dt { margin-top: 14px; font-family: Montserrat, sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--ck-muted); }
.ck-edoc-facts > dt:first-child { margin-top: 0; }
.ck-edoc-facts > dd { margin: 2px 0 0; font-size: 16px; color: var(--ck-text); }
.ck-edoc-facts__file { word-break: break-word; }
.ck-edoc-share { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ck-line); }
.ck-edoc-share .uk-icon-button { width: 32px; height: 32px; }
.ck-edoc-share__label { flex-basis: 100%; margin: 0 0 4px; font-family: Montserrat, sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--ck-muted); }

/* ---- visor a pantalla completa ---- */
.ck-edoc-viewer .uk-modal-dialog { display: flex; flex-direction: column; height: 100vh; background: #2d2e33; }
.ck-edoc-viewer__bar { flex: none; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 20px; background: #4d5a31; color: #fff; }
.ck-edoc-viewer__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: Blinker, sans-serif; font-size: 19px; }
.ck-edoc-viewer__bar .uk-icon-link { color: rgba(255, 255, 255, .85); background: none; border: 0; padding: 6px; cursor: pointer; }
.ck-edoc-viewer__bar .uk-icon-link:hover, .ck-edoc-viewer__bar .uk-icon-link:focus-visible { color: #fff; }
.ck-edoc-viewer__frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---- móvil ---- */
@media (max-width: 959px) {
	.ck-edoc-cat { padding: 20px; gap: 16px; }
	.ck-edoc-cat__icon { width: 48px; height: 48px; }
	.ck-edoc-cat__title { font-size: 20px; }
}
@media (max-width: 639px) {
	.ck-edoc-head { margin-bottom: 28px; }
	.ck-edoc-head__intro { font-size: 16px; }
	.ck-edoc-toolbar { align-items: stretch; }
	.ck-edoc-toolbar__tools { width: 100%; }
	.ck-edoc-select.uk-select { flex: 1; min-width: 0; }
	.ck-edoc-switch { display: none !important; }
	.ck-edoc-doc, .ck-edoc-docs--grid .ck-edoc-doc { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 18px 4px; }
	.ck-edoc-docs--grid { display: block; padding-top: 0; }
	.ck-edoc-docs--grid .ck-edoc-doc { border: 0; border-bottom: 1px solid var(--ck-line); box-shadow: none; }
	.ck-edoc-docs--grid .ck-edoc-doc__actions { border-top: 0; padding-top: 0; }
	.ck-edoc-doc__actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
	.ck-edoc-doc__title { font-size: 18px; }
	.ck-edoc-badge { width: 42px; height: 52px; padding-top: 8px; }
	.ck-edoc-detail__head { gap: 16px; margin-bottom: 28px; padding-bottom: 22px; }
	.ck-edoc-badge--large { width: 56px; height: 70px; padding-top: 12px; }
	.ck-edoc-cover { min-height: 260px; padding: 36px 20px; }
	.ck-edoc-panel { padding: 22px; }
}
