/* Libdig Core — estilos de la cara pública (shortcodes). */

.libdig-front {
    margin: 1.5rem 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Libreta imprimible */
.libdig-report__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

@media print {
    /* Al imprimir, ocultar todo menos la libreta. */
    body * { visibility: hidden; }
    .libdig-report, .libdig-report * { visibility: visible; }
    .libdig-report { position: absolute; left: 0; top: 0; width: 100%; }
    .libdig-report__head .button { display: none; }
}

.libdig-front h2 {
    margin: 0 0 .75rem;
    font-size: 1.5rem;
}

.libdig-front h3 {
    margin: 1.5rem 0 .5rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #e2e4e7;
    padding-bottom: .25rem;
}

.libdig-box {
    padding: 1rem 1.25rem;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.libdig-front-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: .5rem 0 1rem;
}

.libdig-front-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 96px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-top: 3px solid #2271b1;
    border-radius: 8px;
}

.libdig-front-card span {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d2327;
}

.libdig-front-card small {
    color: #646970;
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .03em;
}

.libdig-front-table {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 1rem;
}

.libdig-front-table th,
.libdig-front-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e4e7;
}

.libdig-front-table thead th {
    background: #f6f7f7;
}

.libdig-front-list {
    margin: .5rem 0 1rem;
    padding-left: 1.1rem;
}

.libdig-front-list li {
    margin-bottom: .35rem;
}

/* Administración frontend Libdig */
.libdig-admin-front {
    --ld-brand:#2563eb;
    --ld-brand-2:#7c3aed;
    --ld-brand-3:#0ea5e9;
    --ld-warm:#f59e0b;
    --ld-soft:#f8fafc;
    --ld-line:#dbe4f0;
    --ld-text:#0f172a;
    --ld-muted:#475569;
    --ld-shadow:0 14px 34px rgba(15,23,42,.08);
    color: var(--ld-text);
}
.libdig-front-admin-head {
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 54%, #fff7ed 100%);
    border: 1px solid var(--ld-line);
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--ld-shadow);
}
.libdig-front-admin-head h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 2.6vw, 2.3rem);
    line-height: 1.1;
    color: #0b2358;
}
.libdig-front-admin-head p {
    margin: 0;
    color: var(--ld-muted);
    font-size: 1rem;
}
.libdig-front-admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 14px;
    background: rgba(255,255,255,.8);
    border: 1px solid var(--ld-line);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.libdig-front-admin-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    font-size: .93rem;
    line-height: 1.1;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.libdig-front-admin-nav a:hover,
.libdig-front-admin-nav a:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37,99,235,.16);
    border-color: rgba(37,99,235,.28);
    color: var(--ld-brand);
    text-decoration: none;
}
.libdig-front-admin-nav a.is-active {
    background: linear-gradient(135deg, var(--ld-brand), var(--ld-brand-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 20px rgba(37,99,235,.22);
}
.libdig-front-admin-body,
.libdig-front-box,
.libdig-box {
    background: #fff;
    border: 1px solid var(--ld-line);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--ld-shadow);
}
.libdig-front-admin-body > h3:first-child { margin-top: 0; }
.libdig-front h3 {
    margin: 1.25rem 0 .75rem;
    font-size: 1.35rem;
    border: none;
    padding: 0;
    color: #132a63;
}
.libdig-front h4 {
    margin: 0 0 .85rem;
    font-size: 1.05rem;
    color: #1e3a8a;
}
.libdig-front-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: .5rem 0 1rem;
}
.libdig-front-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    min-height: 110px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--ld-line);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.libdig-front-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(124,58,237,.18));
}
.libdig-front-card span {
    position: relative;
    font-size: 1.9rem;
    font-weight: 800;
    color: #0b2358;
    z-index: 1;
}
.libdig-front-card small {
    position: relative;
    z-index: 1;
    color: var(--ld-muted);
    text-transform: uppercase;
    font-size: .74rem;
    letter-spacing: .05em;
    font-weight: 700;
}
.libdig-front-form,
.libdig-front-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    align-items: end;
    margin: 14px 0 20px;
    padding: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
    border: 1px solid var(--ld-line);
    border-radius: 16px;
}
.libdig-front-field {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #0f172a;
}
.libdig-front-field input,
.libdig-front-field select,
.libdig-front-field textarea,
.libdig-front-filter input,
.libdig-front-filter select,
.libdig-front-filter button,
.libdig-front-form button,
.libdig-front-form input[type=file] {
    width: 100%;
    max-width: 100%;
}
.libdig-front-field input,
.libdig-front-field select,
.libdig-front-field textarea,
.libdig-front-filter input,
.libdig-front-filter select,
.libdig-front-form input[type=file] {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 9px 12px;
    background: #fff;
    box-sizing: border-box;
}
.libdig-front-field textarea,
.libdig-front-form textarea { min-height: 110px; }
.libdig-front-form textarea { grid-column: 1 / -1; }
.libdig-front-form .button,
.libdig-front-filter .button,
.libdig-front-filter button,
.libdig-inline-action .button,
.libdig-front a.button,
.libdig-front button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
    box-shadow: none;
}
.libdig-front .button-primary,
.libdig-front button.button-primary {
    background: linear-gradient(135deg, var(--ld-brand), var(--ld-brand-2));
    border-color: transparent;
    color: #fff;
}
.libdig-front .button:hover,
.libdig-front button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
.libdig-front-check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 700;
}
.libdig-front-notice {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: 700;
}
.libdig-front-notice--ok {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.libdig-front-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.libdig-front details.libdig-front-box {
    overflow: hidden;
    padding: 0;
}
.libdig-front details.libdig-front-box summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--ld-brand);
    list-style: none;
    padding: 16px 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    border-bottom: 1px solid var(--ld-line);
}
.libdig-front details.libdig-front-box summary::-webkit-details-marker { display: none; }
.libdig-front details.libdig-front-box > *:not(summary) { margin: 0 16px 16px; }
.libdig-front-editor { border-left: 4px solid #2563eb; }
.libdig-front-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: .75rem 0 1rem;
    overflow: hidden;
    border: 1px solid var(--ld-line);
    border-radius: 16px;
    background: #fff;
}
.libdig-front-table thead th {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    color: #0b2358;
    font-size: .9rem;
    font-weight: 800;
}
.libdig-front-table th,
.libdig-front-table td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid #e9eef5;
    vertical-align: top;
}
.libdig-front-table tbody tr:nth-child(even) td { background: #fcfdff; }
.libdig-front-table tbody tr:hover td { background: #f7fbff; }
.libdig-front-table td:last-child { white-space: nowrap; }
.libdig-inline-action { display: inline-flex; margin: 2px; }
.libdig-front-list {
    margin: .5rem 0 1rem;
    padding-left: 1.15rem;
}
.libdig-front-list li { margin-bottom: .45rem; }

@media (max-width: 900px) {
    .libdig-front-admin-nav { padding: 12px; }
    .libdig-front-admin-nav a { flex: 1 1 auto; }
}
@media (max-width: 640px) {
    .libdig-front-form,
    .libdig-front-filter { grid-template-columns: 1fr; }
    .libdig-front-admin-head,
    .libdig-front-admin-body,
    .libdig-front-box { padding: 14px; border-radius: 16px; }
    .libdig-front-table { display: block; overflow-x: auto; }
}


/* ==========================================================
 * Libdig Core 1.0.11 — variante visual más escolar
 * Azul + amarillo + naranjo, mayor calidez y jerarquía visual.
 * ========================================================== */
.libdig-admin-front {
    --ld-brand:#1d4ed8;
    --ld-brand-2:#2563eb;
    --ld-brand-3:#0ea5e9;
    --ld-yellow:#facc15;
    --ld-orange:#fb923c;
    --ld-green:#22c55e;
    --ld-soft:#fffdf4;
    --ld-line:#dbeafe;
    --ld-text:#0f172a;
    --ld-muted:#475569;
    --ld-shadow:0 18px 38px rgba(30,64,175,.12);
}
.libdig-admin-front::before {
    content:'';
    display:block;
    height: 8px;
    border-radius:999px;
    margin: 0 0 14px;
    background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 30%, #facc15 68%, #fb923c 100%);
    box-shadow:0 8px 20px rgba(37,99,235,.16);
}
.libdig-front-admin-head {
    position:relative;
    overflow:hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(250,204,21,.30) 0, rgba(250,204,21,0) 24%),
        radial-gradient(circle at 8% 20%, rgba(14,165,233,.22) 0, rgba(14,165,233,0) 28%),
        linear-gradient(135deg, #eff6ff 0%, #f0f9ff 45%, #fff7ed 100%);
    border: 1px solid #bfdbfe;
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--ld-shadow);
}
.libdig-front-admin-head::after {
    content:'✦';
    position:absolute;
    right:28px;
    bottom:18px;
    font-size:42px;
    color:rgba(251,146,60,.28);
    transform:rotate(12deg);
}
.libdig-front-admin-head h2 {
    color:#0b2f78;
    letter-spacing:-.03em;
}
.libdig-front-admin-head p {
    color:#334155;
    font-weight:600;
}
.libdig-front-admin-nav {
    background:
        linear-gradient(180deg, rgba(255,255,255,.95), rgba(239,246,255,.92));
    border-color:#bfdbfe;
    border-radius:24px;
    padding:14px;
    box-shadow:0 12px 28px rgba(30,64,175,.08);
}
.libdig-front-admin-nav a {
    border:1px solid #bfdbfe;
    background:#ffffff;
    color:#1e3a8a;
    box-shadow:0 6px 14px rgba(30,64,175,.05);
}
.libdig-front-admin-nav a:hover,
.libdig-front-admin-nav a:focus {
    color:#0f172a;
    border-color:#93c5fd;
    background:linear-gradient(180deg,#ffffff,#eff6ff);
    box-shadow:0 12px 22px rgba(37,99,235,.18);
}
.libdig-front-admin-nav a.is-active {
    background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 55%,#22c55e 140%);
    color:#fff;
    border-color:transparent;
    box-shadow:0 14px 24px rgba(37,99,235,.28);
}
.libdig-front-admin-body,
.libdig-front-box,
.libdig-box {
    border-color:#bfdbfe;
    border-radius:24px;
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
    box-shadow:0 16px 36px rgba(30,64,175,.08);
}
.libdig-front h3 {
    color:#123b85;
    font-size:1.45rem;
    letter-spacing:-.02em;
    display:flex;
    align-items:center;
    gap:10px;
}
.libdig-front h3::before {
    content:'';
    width:12px;
    height:32px;
    border-radius:999px;
    background:linear-gradient(180deg,#facc15,#fb923c);
    box-shadow:0 8px 16px rgba(251,146,60,.22);
}
.libdig-front-cards {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.libdig-front-card {
    min-height:120px;
    border:1px solid #bfdbfe;
    border-radius:24px;
    background:
        radial-gradient(circle at 88% 16%, rgba(250,204,21,.20) 0, rgba(250,204,21,0) 28%),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    box-shadow:0 14px 28px rgba(30,64,175,.08);
}
.libdig-front-card:nth-child(3n+1) { border-top:5px solid #2563eb; }
.libdig-front-card:nth-child(3n+2) { border-top:5px solid #facc15; }
.libdig-front-card:nth-child(3n+3) { border-top:5px solid #fb923c; }
.libdig-front-card span {
    color:#0b2f78;
}
.libdig-front-card small {
    color:#475569;
}
.libdig-front-form,
.libdig-front-filter {
    background:
        radial-gradient(circle at 100% 0%, rgba(250,204,21,.18), transparent 28%),
        linear-gradient(180deg,#f8fbff 0%,#fffdf4 100%);
    border-color:#bfdbfe;
    border-radius:22px;
    padding:18px;
}
.libdig-front-field span,
.libdig-front-form label span {
    color:#123b85;
}
.libdig-front-field input,
.libdig-front-field select,
.libdig-front-field textarea,
.libdig-front-filter input,
.libdig-front-filter select,
.libdig-front-form input[type=file] {
    border-color:#bfdbfe;
    border-radius:14px;
    background:#fff;
}
.libdig-front-field input:focus,
.libdig-front-field select:focus,
.libdig-front-field textarea:focus,
.libdig-front-filter input:focus,
.libdig-front-filter select:focus {
    outline:3px solid rgba(250,204,21,.28);
    border-color:#2563eb;
}
.libdig-front .button-primary,
.libdig-front button.button-primary {
    background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 55%,#22c55e 135%);
    border-color:transparent;
    color:#fff;
}
.libdig-front .button:not(.button-primary),
.libdig-front button:not(.button-primary) {
    border-color:#bfdbfe;
}
.libdig-front details.libdig-front-box summary {
    background:
        linear-gradient(90deg, rgba(37,99,235,.10), rgba(250,204,21,.16), rgba(251,146,60,.10));
    color:#0b2f78;
    font-size:1rem;
}
.libdig-front-table {
    border-color:#bfdbfe;
    border-radius:20px;
    box-shadow:0 12px 26px rgba(30,64,175,.06);
}
.libdig-front-table thead th {
    background:linear-gradient(180deg,#dbeafe 0%,#eff6ff 100%);
    color:#0b2f78;
}
.libdig-front-table tbody tr:nth-child(even) td {
    background:#fffdf4;
}
.libdig-front-table tbody tr:hover td {
    background:#eff6ff;
}
.libdig-front-notice--ok {
    background:#ecfdf5;
    border-color:#86efac;
    color:#14532d;
}
.libdig-front-notice--error {
    background:#fff1f2;
    border-color:#fecdd3;
    color:#9f1239;
}
.libdig-front-editor {
    border-left:6px solid #facc15;
}
@media (max-width: 640px) {
    .libdig-admin-front::before { height:6px; }
    .libdig-front-admin-head::after { display:none; }
    .libdig-front-admin-nav a { width:100%; }
}
