/* =====================================================
   BASE COMÚN A TODOS LOS ESQUEMAS DE COLOR
   (todo lo que no depende del color elegido: tamaños,
   densidad, animaciones, semántica de badges, etc.)
===================================================== */

/* Transición suave al alternar claro/oscuro */
body,
#nav-sidebar,
header,
#main {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

#content {
    animation: fadeInUp .35s ease;
    padding-top: .75rem !important;
}

@keyframes shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, -18px) scale(1.08); }
}

/* =====================================================
   ÁREA DEL LOGO (más grande y con más aire)
===================================================== */

#nav-sidebar-inner > div:first-child {
    height: auto !important;
    min-height: 92px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

#nav-sidebar-inner img[alt="Home"] {
    height: 48px !important;
    width: auto !important;
}

/* =====================================================
   MENÚ LATERAL: estructura común (el color lo pone cada
   esquema); los enlaces siempre tienen el mismo tamaño y
   comportamiento de hover/activo.
===================================================== */

#nav-sidebar a {
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

#nav-sidebar a:hover {
    transform: translateX(2px);
    border-radius: 10px;
}

#nav-sidebar .active {
    border-radius: 10px;
}

#nav-sidebar svg {
    opacity: .9;
}

/* =====================================================
   TABLAS DEL LISTADO (más compactas)
===================================================== */

table {
    border-radius: 12px;
    overflow: hidden;
}

table td,
table th {
    padding-top: .55rem !important;
    padding-bottom: .55rem !important;
}

table tbody tr {
    transition: background-color .15s ease;
}

/* =====================================================
   BOTONES (forma y comportamiento; el color lo pone cada
   esquema)
===================================================== */

button,
.btn,
a[class*="bg-primary"],
button[class*="bg-primary"] {
    border-radius: 10px !important;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
}

a[class*="bg-primary"]:hover,
button[class*="bg-primary"]:hover {
    filter: brightness(1.06);
}

/* Botón de éxito (aprobar) y peligro (rechazar): semántica fija,
   no cambia entre esquemas de color */
button[class*="bg-green"],
a[class*="bg-green"] {
    background-image: linear-gradient(135deg, #16a34a, #15803d) !important;
}

button[class*="bg-red"],
a[class*="bg-red"] {
    background-image: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.btn-recalcular {
    color: #ffffff !important;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-recalcular:hover {
    filter: brightness(1.06);
}

/* =====================================================
   BADGES (semántica fija: no dependen del esquema de color)
===================================================== */

.badge-estado {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-radicado { background: #dbeafe; color: #1e40af; }
.badge-en_revision { background: #ffedd5; color: #9a3412; }
.badge-aprobado { background: #dcfce7; color: #166534; }
.badge-glosado { background: #fee2e2; color: #991b1b; }
.badge-pagado { background: #dcfce7; color: #166534; }

.badge-sin_recobro { background: #f1f5f9; color: #475569; }

.badge-entidad-eps { background: #dbeafe; color: #1e40af; }
.badge-entidad-arl { background: #ffedd5; color: #9a3412; }
.badge-entidad-afp { background: #ede9fe; color: #5b21b6; }
.badge-entidad-empleador { background: #f1f5f9; color: #475569; }

.badge-etapa {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
    white-space: nowrap;
}

/* =====================================================
   QUICK STATS Y HERO: estructura común
===================================================== */

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp .4s ease;
}

.home-hero-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    opacity: .85;
    margin-bottom: 4px;
}

.home-hero-title {
    font-size: 25px;
    font-weight: 800;
    margin: 0 0 5px;
    letter-spacing: -.01em;
}

.home-hero-subtitle {
    margin: 0;
    font-size: 13.5px;
    opacity: .9;
    max-width: 46em;
}

.home-hero-cta {
    position: relative;
    z-index: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .38);
    color: #fff !important;
    padding: 9px 16px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.qs-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 13px 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.qs-card:hover {
    transform: translateY(-3px);
}

.qs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 21px !important;
    flex-shrink: 0;
}

.qs-green { background: linear-gradient(135deg, rgba(22,163,74,.09), rgba(22,163,74,.02)); }
.qs-green .qs-icon { background: #dcfce7; color: #16a34a; }

.qs-red   { background: linear-gradient(135deg, rgba(220,38,38,.09), rgba(220,38,38,.02)); }
.qs-red .qs-icon   { background: #fee2e2; color: #dc2626; }

.qs-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 3px;
}

.qs-value {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #0f172a;
}

.dark .qs-value,
[data-theme="dark"] .qs-value {
    color: #f1f5f9;
}

.dark .qs-label,
[data-theme="dark"] .qs-label {
    color: #94a3b8;
}

/* =====================================================
   LOGIN: estructura común
===================================================== */

#page.bg-white {
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
}

#page.bg-white::before,
#page.bg-white::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

#page.bg-white::before {
    width: 260px;
    height: 260px;
    left: -80px;
    top: -60px;
    animation: floatBlob 9s ease-in-out infinite;
}

#page.bg-white::after {
    width: 320px;
    height: 320px;
    left: 10%;
    bottom: -140px;
    animation: floatBlob 11s ease-in-out infinite reverse;
}

#page.bg-white .rounded-default.w-md {
    position: relative;
    z-index: 1;
    animation: fadeInUp .45s ease;
    transition: box-shadow .25s ease, transform .25s ease;
}

#page.bg-white input:focus {
    transition: box-shadow .2s ease;
}

#page.bg-white button[type="submit"] {
    background-size: 200% auto !important;
    transition: background-position .5s ease, transform .15s ease, box-shadow .15s ease;
}

#page.bg-white button[type="submit"]:hover {
    background-position: 100% 0 !important;
    transform: translateY(-1px);
}

#page.bg-white > div.bg-cover {
    position: relative;
}

#page.bg-white > div.bg-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0) 60%, rgba(2, 6, 23, .28) 100%);
}
