/* =========================================================================
   ucine-v4.css  -  Ajustes de marca Universidad del Cine sobre SB Admin Pro
   Se carga DESPUES de webFUCv4.css. Solo cambia aspecto, no estructura.
   ========================================================================= */

:root {
    --uc-naranja: #F57C00;
    --uc-naranja-osc: #D96C00;
    --uc-naranja-titulo: #B35900; /* naranja oscuro para titulos de card */
    --uc-naranja-claro: #FF8000;
    --uc-marron: #964B00;
    --uc-naranja-suave: rgba(245, 124, 0, .12);

    /* Reemplaza el azul primario de SB Admin Pro por el naranja */
    --bs-primary: #F57C00;
    --bs-primary-rgb: 245, 124, 0;
    --bs-link-color: #F57C00;
    --bs-link-hover-color: #D96C00;
}

/* ---- Textos mas oscuros (mejor lectura) ---- */
:root { --bs-body-color: #2b2f33; }
.text-muted, .form-text, .text-gray-500, .text-gray-600 { color: #4a5058 !important; }
.form-label, .form-check-label { color: #2b2f33; }
.table, .table > :not(caption) > * > * { color: #2b2f33; }
.table th { color: #2b2f33; }
.form-control, .form-select { color: #2b2f33; }
.form-control::placeholder { color: #7a8088; }
.alert-light { color: #2b2f33; }

/* ---- Barra superior (degrade naranja del menu) ---- */
.uc-topbar {
    background: radial-gradient(circle at 5% 50%, var(--uc-naranja-claro) 0%, #CC6900 55%, var(--uc-marron) 100%);
    color: #fff;
    height: 46px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.uc-topbar .uc-logo-svg { height: 30px; width: auto; display: block; }
.uc-topbar .uc-logo {
    background: #fff;
    border-radius: .35rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: .6rem;
}
.uc-topbar .uc-logo img { width: 24px; height: 24px; }
.uc-topbar .uc-marca { font-weight: 700; font-size: 1.05rem; color: #fff; letter-spacing: .2px; }

/* ---- Links ---- */
a { color: var(--uc-naranja); }
a:hover { color: var(--uc-naranja-osc); }

/* ---- Encabezado de pagina ---- */
.page-header .page-header-icon { color: var(--uc-naranja); }
.page-header .page-header-title { color: #333; }

/* ---- Botones ---- */
.btn-primary { background-color: var(--uc-naranja); border-color: var(--uc-naranja); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--uc-naranja-osc) !important; border-color: var(--uc-naranja-osc) !important; color: #fff !important;
}
.btn-outline-primary { color: var(--uc-naranja); border-color: var(--uc-naranja); }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--uc-naranja) !important; border-color: var(--uc-naranja) !important; color: #fff !important;
}
.btn-light { border-color: #dcdfe6; }

/* ---- Campos de formulario (textbox, select, textarea, check) ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--uc-naranja);
    box-shadow: 0 0 0 .2rem rgba(245, 124, 0, .2);
}
.form-control[readonly] { background-color: #fff; }
.form-check-input:checked { background-color: var(--uc-naranja); border-color: var(--uc-naranja); }
.form-check-input:focus { border-color: var(--uc-naranja); box-shadow: 0 0 0 .2rem rgba(245, 124, 0, .2); }
.form-label { font-weight: 600; font-size: .85rem; color: #2b2f33; }

/* ---- Tablas ---- */
.table > thead > tr > th { color: #2b2f33; border-bottom-color: var(--uc-naranja); }
.table th { background-color: #f8f9fb; color: #2b2f33; font-weight: 600; vertical-align: middle; }

/* ---- Tablas en celular: scroll horizontal con barra visible ---- */
/* La barra nativa se oculta y la reemplaza una propia, siempre visible (js/ucine-v4.js) */
.uc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: .25rem; scrollbar-width: none; -ms-overflow-style: none; }
.uc-scroll::-webkit-scrollbar { display: none; }
.uc-scroll > .table { min-width: 640px; }
.uc-scroll > .table th, .uc-scroll > .table td { white-space: nowrap; }
.uc-scroll > .table td:nth-child(2) { white-space: normal; min-width: 220px; }
/* mCA_ctacte: Fecha | Saldo | Descripcion | Referencias -> la descripcion es la 3ra columna */
.uc-scroll > .table.uc-ctacte td:nth-child(2) { white-space: nowrap; min-width: 0; }
.uc-scroll > .table.uc-ctacte td:nth-child(3) { white-space: normal; min-width: 220px; }
.uc-sbar { display: none; position: relative; height: 12px; background: #e3e6ec; border-radius: 6px; margin: .4rem 0 .25rem; }
.uc-sthumb { position: absolute; top: 0; left: 0; height: 12px; min-width: 44px; background: var(--uc-naranja); border-radius: 6px; cursor: grab; touch-action: none; }
.uc-shint { display: none; text-align: center; font-size: .75rem; color: #4a5058; margin-bottom: .75rem; }

/* ---- Aviso parpadeante ("Buscando...") ---- */
.blink { animation: ucblink 1s steps(1, start) infinite; }
@keyframes ucblink { 50% { opacity: 0; } }

/* ---- Instructivos paso a paso (letra + texto + captura) ---- */
.uc-paso { display: flex; gap: 1rem; margin-bottom: 1.75rem; }
.uc-paso-letra {
    flex: 0 0 34px; height: 34px; border-radius: 50%;
    background: var(--uc-naranja-titulo); color: #fff;
    font-weight: 700; display: flex; align-items: center; justify-content: center;
    text-transform: uppercase;
}
.uc-paso-texto { flex: 1 1 auto; min-width: 0; }
.uc-paso-texto p { margin-bottom: .75rem; }
.uc-captura { border: 1px solid #d5d9e0; border-radius: .4rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ---- Calendario JS (calendar/calendar.js): anclado a la derecha del viewport ---- */
#calendarDiv, #calendarDiv * { box-sizing: content-box; }
#calendarDiv {
    position: fixed !important;
    left: auto !important;
    right: 12px !important;
    top: 90px !important;
    z-index: 2000 !important;
    border-radius: .4rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
    color: #2b2f33;
    line-height: normal;
    text-align: left;
}
#calendarDiv table { margin: 0; width: auto; }
#calendarDiv img { max-width: none; vertical-align: baseline; }
#calendarDiv td { font-size: 11px; }

/* ---- Ejemplo de credencial (mCE_creden1.asp) ---- */
.uc-cred {
    --uc-cred-naranja: #FF8200;
    position: relative; width: 250px; height: 400px; margin: 0 auto;
    display: flex; flex-direction: column;
    background: #fff; border: 3px solid var(--uc-cred-naranja); border-radius: 8px; overflow: hidden;
    font-family: Helvetica, Arial, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    box-sizing: border-box;
}
.uc-cred > div { box-sizing: border-box; }
.uc-cred-head { flex: 0 0 46px; display: flex; align-items: center; justify-content: center; padding: 4px 8px; }
.uc-cred-head img { max-width: 100%; max-height: 100%; }
.uc-cred-nombre, .uc-cred-mat, .uc-cred-dni {
    background: var(--uc-cred-naranja); color: #fff; text-align: center;
    display: flex; align-items: center; justify-content: center;
    border-top: 1px solid #fff;
}
.uc-cred-nombre { flex: 0 0 32px; font-size: 13px; }
.uc-cred-mat { flex: 0 0 38px; font-size: 21px; }
.uc-cred-dni { flex: 0 0 28px; font-size: 14px; }
.uc-cred-barcode { flex: 0 0 76px; padding: 6px 10px 0; text-align: center; }
.uc-cred-bars { width: 100%; height: 46px; display: block; fill: #111; }
.uc-cred-code { font-size: 15px; letter-spacing: 4px; font-weight: 600; color: #111; margin-top: 1px; }
.uc-cred-pie { flex: 1 1 auto; display: flex; border-top: 2px solid var(--uc-cred-naranja); }
.uc-cred-izq { flex: 1 1 50%; padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.uc-cred-est { color: var(--uc-cred-naranja); font-weight: 800; font-size: 14px; line-height: 1.05; text-align: center; }
.uc-cred-qr { width: 88%; aspect-ratio: 1; fill: #111; background: #fff; }
.uc-cred-foto { flex: 1 1 50%; background: var(--uc-cred-naranja); padding: 0 0 0 3px; }
.uc-cred-fotosvg { width: 100%; height: 100%; display: block; }
.uc-cred-marca {
    position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%) rotate(-24deg);
    font-size: 30px; font-weight: 800; letter-spacing: 3px; color: rgba(200, 30, 30, .30);
    border: 3px solid rgba(200, 30, 30, .30); border-radius: 6px; padding: 0 8px; pointer-events: none;
}

/* ---- Portada (index.html): tarjetas de acceso ---- */
.uc-acceso {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: .55rem; height: 100%; min-height: 190px; padding: 1.5rem 1rem;
    background: #fff; border-radius: .6rem; border-top: 4px solid var(--uc-naranja);
    box-shadow: 0 .15rem 1.25rem rgba(33, 40, 50, .12); color: #2b2f33; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.uc-acceso:hover, .uc-acceso:focus { transform: translateY(-3px); box-shadow: 0 .4rem 1.75rem rgba(33, 40, 50, .22); color: #2b2f33; text-decoration: none; }
.uc-acceso-nuevo { border-top-color: var(--uc-naranja-titulo); }
.uc-acceso-icono {
    width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--uc-naranja-suave); color: var(--uc-naranja-titulo);
}
.uc-acceso-icono svg { width: 32px; height: 32px; }
.uc-acceso-titulo { font-weight: 700; font-size: 1.15rem; }
.uc-acceso-etiqueta {
    font-size: .75rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    background: var(--uc-naranja-titulo); color: #fff; border-radius: 1rem; padding: .15rem .7rem;
}

/* ---- Cards ---- */
/* El selector con :not() iguala la especificidad de la regla azul de SB Admin */
.card .card-header,
.card:not([class*=bg-]) .card-header { font-weight: 600; color: var(--uc-naranja-titulo); }
.card .card-header a,
.card:not([class*=bg-]) .card-header a { color: var(--uc-naranja-titulo); }
.card.uc-card-naranja { border-top: 3px solid var(--uc-naranja); }

/* ---- Utilidades ---- */
.text-primary { color: var(--uc-naranja) !important; }
.bg-primary-soft { background-color: var(--uc-naranja-suave) !important; }
.uc-codigo-pago {
    font-size: 1.25rem; font-weight: 700; letter-spacing: 1px;
    background: var(--uc-naranja-suave); border: 1px dashed var(--uc-naranja);
    border-radius: .4rem; padding: .5rem .9rem; display: inline-block; color: #333;
}
.uc-medio-logo { max-height: 56px; height: auto; }
.uc-barcode { text-align: center; }
