﻿/* 
 Modernización del CSS original
 Compatible con Bootstrap 3/4 y componentes existentes
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0891b2;
    --dark: #1f2937;
    --text: #374151;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8fafc;
    --white: #ffffff;
}

* {
    outline: none !important;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 600;
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

p {
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        text-decoration: none;
    }

/* Layout */
#wrapper {
    width: 100%;
}

#page-wrapper {
    min-height: 568px;
    padding: 20px;
    background: var(--bg);
}

.container-fluid {
    padding: 20px;
}

/* Cards / Panels */
.panel,
.white-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}

.panel {
    margin-bottom: 25px;
}

    .panel .panel-heading {
        background: transparent;
        border-bottom: 1px solid var(--border);
        padding: 18px 22px;
        border-radius: 12px 12px 0 0;
    }

    .panel .panel-body {
        padding: 22px;
    }

.white-box {
    padding: 25px;
}

/* Navbar */
.navbar-header {
    background: var(--dark);
    border: 0;
}

.navbar-top-links > li > a {
    color: white;
    line-height: 60px;
    padding: 0 18px;
}

    .navbar-top-links > li > a:hover {
        background: rgba(255,255,255,.1);
    }

/* Forms */
.form-control {
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: none;
    transition: .2s;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    }

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 8px 18px;
    border: 0;
    transition: .2s;
    font-weight: 600;
}

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

.btn-primary,
.btn-custom {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover,
    .btn-custom:hover {
        background: var(--primary-dark);
    }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-rounded {
    border-radius: 50px;
}

.btn-circle {
    border-radius: 50%;
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

    .table thead {
        background: #f1f5f9;
    }

    .table > thead > tr > th {
        border: 0;
        font-weight: 700;
        color: var(--dark);
    }

    .table > tbody > tr:hover {
        background: #f8fafc;
    }

/* Dropdown */
.dropdown-menu {
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    padding: 8px;
}

    .dropdown-menu li a {
        padding: 10px 15px;
        border-radius: 6px;
    }

        .dropdown-menu li a:hover {
            background: #eff6ff;
        }

/* Labels */
.label,
.badge {
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: 600;
}

.label-primary,
.badge-primary {
    background: var(--primary);
}

.label-success {
    background: var(--success);
}

.label-danger {
    background: var(--danger);
}

/* Modal */
.modal-content {
    border-radius: 14px;
    border: 0;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.modal-header {
    border-bottom: 1px solid var(--border);
}

/* Utility */
.text-muted {
    color: var(--muted) !important;
}

.bg-primary {
    background: var(--primary) !important;
}

.bg-white {
    background: white !important;
}

.p-0 {
    padding: 0 !important
}

.p-10 {
    padding: 10px !important
}

.p-20 {
    padding: 20px !important
}

.p-30 {
    padding: 30px !important
}

.m-0 {
    margin: 0 !important
}

.shadow {
    box-shadow: 0 5px 20px rgba(0,0,0,.08);
}

/* Responsive */
@media(max-width:768px) {
    #page-wrapper {
        padding: 10px;
    }

    .container-fluid {
        padding: 10px;
    }

    h1 {
        font-size: 28px;
    }
}

.form-control {
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: none;
    transition: .2s;
    padding: 10px 15px;
}

    .form-control::placeholder {
        color: #9ca3af;
        opacity: 1;
    }


.input-sm {
    height: 32px;
    padding: 6px 12px;
}

.input-lg {
    height: 46px;
    padding: 12px 18px;
}

/* =========================================
   RESPONSIVE SIDEBAR
========================================= */

@media (max-width: 768px) {

    .sidebar {
        width: 250px;
        left: 0;
        top: 60px;
        transform: translateX(0);
        transition: .3s ease;
        z-index: 1050;
    }


    #page-wrapper {
        margin-left: 250px;
    }
}


/* Tablets y móviles */

@media (max-width: 600px) {


    .sidebar {
        transform: translateX(-100%);
    }


        .sidebar.open {
            transform: translateX(0);
        }


    #page-wrapper {
        margin-left: 0;
    }
}

.input-validation-error {
    font-weight: 400;
    background-color: #fee2e2; /* rojo suave */

    border: 1px solid #ef4444;
    color: #7f1d1d;
}

.input-validation-error::placeholder {
    color: #b91c1c;
    opacity: 1;
}