:root{
    --ledm-primary:#0D63C9;
    --ledm-primary-dark:#0A4FA5;
    --ledm-primary-light:#EAF4FF;
    --ledm-cyan:#38BDF8;
    --ledm-bg:#F5F7FB;
    --ledm-card:#FFFFFF;
    --ledm-text:#0F172A;
    --ledm-muted:#64748B;
    --ledm-border:#E5EDF8;
    --ledm-success:#16A34A;
    --ledm-warning:#F97316;
    --ledm-danger:#DC2626;
    --ledm-purple:#7E22CE;
}

/* BASE */
body{
    background:var(--ledm-bg)!important;
    color:var(--ledm-text)!important;
    font-size:12px!important;
}

/* TITULOS */
h1{
    font-size:23px!important;
    font-weight:900!important;
    color:var(--ledm-text)!important;
}

h2{
    font-size:18px!important;
    font-weight:900!important;
}

h3{
    font-size:15px!important;
    font-weight:900!important;
}

/* TARJETAS */
.card,
.panel,
.box,
.stat-card,
.dashboard-card,
div[style*="background:#dbeafe"],
div[style*="background:#dcfce7"],
div[style*="background:#fef9c3"],
div[style*="background:#fce7f3"],
div[style*="background:#ede9fe"],
div[style*="background:#cffafe"],
div[style*="background:#ffedd5"]{
    background:var(--ledm-card)!important;
    border:1px solid var(--ledm-border)!important;
    border-radius:14px!important;
    box-shadow:0 8px 20px rgba(15,23,42,.07)!important;
    padding:12px 14px!important;
}

/* BOTONES */
button,
.btn,
input[type="submit"],
input[type="button"],
a[style*="background:"],
a[href*="pdf"],
a[href*="export"],
a[href*="excel"],
a[href*="csv"]{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:30px!important;
    padding:6px 12px!important;
    border-radius:8px!important;
    border:0!important;
    font-size:11px!important;
    font-weight:800!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    background:linear-gradient(135deg,var(--ledm-primary),var(--ledm-primary-dark))!important;
    color:#fff!important;
    box-shadow:0 4px 10px rgba(15,23,42,.14)!important;
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
a[style*="background:"]:hover{
    filter:brightness(.96)!important;
    transform:translateY(-1px)!important;
}

/* BOTONES POR COLOR */
.btn-danger,
button[style*="background:#dc2626"],
a[style*="background:#dc2626"],
button[style*="background:red"],
a[style*="background:red"]{
    background:linear-gradient(135deg,var(--ledm-danger),#ef4444)!important;
}

.btn-success,
a[href*="excel"],
a[href*="csv"],
a[href*="export"]{
    background:linear-gradient(135deg,#059669,var(--ledm-success))!important;
}

.btn-warning,
button[style*="background:#d97706"],
a[style*="background:#d97706"]{
    background:linear-gradient(135deg,var(--ledm-warning),#ea580c)!important;
}

/* PDF */
a[href*="pdf"],
a[href*="PDF"]{
    min-width:68px!important;
    width:68px!important;
    max-width:68px!important;
    background:linear-gradient(135deg,var(--ledm-primary),var(--ledm-primary-dark))!important;
    color:#fff!important;
    font-size:11px!important;
}

a[href*="pdf"]::before,
a[href*="PDF"]::before{
    content:""!important;
}

/* FORMULARIOS */
input,
select,
textarea{
    border:1px solid #CBD5E1!important;
    border-radius:8px!important;
    padding:7px 9px!important;
    font-size:12px!important;
    background:#fff!important;
    color:var(--ledm-text)!important;
}

input:focus,
select:focus,
textarea:focus{
    outline:none!important;
    border-color:var(--ledm-primary)!important;
    box-shadow:0 0 0 3px rgba(13,99,201,.14)!important;
}

/* TABLAS */
table{
    width:100%!important;
    border-collapse:collapse!important;
    background:#fff!important;
    border-radius:12px!important;
    overflow:hidden!important;
    border:1px solid var(--ledm-border)!important;
    box-shadow:0 6px 16px rgba(15,23,42,.06)!important;
}

thead,
thead tr,
thead th,
th{
    background:var(--ledm-primary)!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:800!important;
    padding:8px 8px!important;
    border-color:#2f7fdd!important;
}

tbody td,
td{
    font-size:11px!important;
    padding:7px 8px!important;
    line-height:1.25!important;
    border-color:#E4EDF7!important;
}

tbody tr:nth-child(even){
    background:#F8FBFF!important;
}

tbody tr:hover{
    background:#EAF4FF!important;
}

/* ALERTAS */
.alert,
.alert-success,
.alert-danger,
.alert-warning,
div[style*="background:#fee2e2"]{
    border-radius:12px!important;
    border:1px solid var(--ledm-border)!important;
    font-size:12px!important;
}

/* SIDEBAR */
.sidebar{
    background:linear-gradient(180deg,#061526,#0A1F38)!important;
}

.sidebar a{
    border-radius:10px!important;
    font-size:13px!important;
    font-weight:700!important;
}

.sidebar-header img{
    width:52px!important;
    max-width:52px!important;
}

/* MODO OSCURO */
body.ledm-dark{
    background:#0F172A!important;
    color:#E5E7EB!important;
}

body.ledm-dark .content,
body.ledm-dark main,
body.ledm-dark .main-content{
    background:#0F172A!important;
}

body.ledm-dark .card,
body.ledm-dark .panel,
body.ledm-dark .box,
body.ledm-dark .stat-card,
body.ledm-dark .dashboard-card,
body.ledm-dark table,
body.ledm-dark form,
body.ledm-dark div[style*="background:#dbeafe"],
body.ledm-dark div[style*="background:#dcfce7"],
body.ledm-dark div[style*="background:#fef9c3"],
body.ledm-dark div[style*="background:#fce7f3"],
body.ledm-dark div[style*="background:#ede9fe"],
body.ledm-dark div[style*="background:#cffafe"],
body.ledm-dark div[style*="background:#ffedd5"]{
    background:#1E293B!important;
    color:#E5E7EB!important;
    border-color:#334155!important;
}

body.ledm-dark h1,
body.ledm-dark h2,
body.ledm-dark h3,
body.ledm-dark p,
body.ledm-dark label,
body.ledm-dark span,
body.ledm-dark div,
body.ledm-dark td{
    color:#E5E7EB!important;
}

body.ledm-dark input,
body.ledm-dark select,
body.ledm-dark textarea{
    background:#0F172A!important;
    color:#E5E7EB!important;
    border-color:#475569!important;
}

body.ledm-dark tbody tr:nth-child(even){
    background:#162033!important;
}

body.ledm-dark tbody tr:hover{
    background:#24344D!important;
}

/* RESPONSIVE */
@media(max-width:900px){
    body{font-size:11px!important;}
    table,td,th{font-size:10px!important;}
    h1{font-size:21px!important;}
}

/* CORRECCIÓN TARJETAS KPI - ICONOS NO TAPAN CANTIDADES */
div[style*="background:#dbeafe"],
div[style*="background:#dcfce7"],
div[style*="background:#fef9c3"],
div[style*="background:#fce7f3"],
div[style*="background:#ede9fe"],
div[style*="background:#cffafe"],
div[style*="background:#ffedd5"]{
    padding-left:72px!important;
    min-height:86px!important;
}

div[style*="background:#dbeafe"]::after,
div[style*="background:#dcfce7"]::after,
div[style*="background:#fef9c3"]::after,
div[style*="background:#fce7f3"]::after,
div[style*="background:#ede9fe"]::after,
div[style*="background:#cffafe"]::after,
div[style*="background:#ffedd5"]::after{
    left:16px!important;
    width:36px!important;
    height:36px!important;
}

div[style*="background:#dbeafe"] h2,
div[style*="background:#dcfce7"] h2,
div[style*="background:#fef9c3"] h2,
div[style*="background:#fce7f3"] h2,
div[style*="background:#ede9fe"] h2,
div[style*="background:#cffafe"] h2,
div[style*="background:#ffedd5"] h2{
    margin-left:0!important;
    font-size:22px!important;
    line-height:1.1!important;
}

