/* 
   ADMIN-ENHANCED.CSS - Mejoras estéticas globales para AdminLTE
   Diseño profesional, limpio y moderno con micro-interacciones
*/

:root {
    --enhanced-radius: 12px;
    --enhanced-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --enhanced-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --enhanced-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --enhanced-border: #e9ecef;
    --enhanced-text-muted: #8898aa;
}

/* ==============================
   CONTENT WRAPPER
   ============================== */
.content-wrapper {
    background: #f5f7fb;
}

/* ==============================
   CARDS GLOBALES
   ============================== */
.card {
    border-radius: var(--enhanced-radius) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: var(--enhanced-shadow) !important;
    transition: var(--enhanced-transition);
}

.card:hover {
    box-shadow: var(--enhanced-shadow-hover) !important;
}

.card-header {
    border-bottom: 1px solid var(--enhanced-border);
    background: #fff;
    padding: 1rem 1.5rem;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #32325d;
}

.card-body {
    padding: 1.5rem;
}

/* ==============================
   CONTENT HEADER (Page Titles)
   ============================== */
.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #32325d;
}

.content-header h1 i {
    margin-right: 0.5rem;
}

/* ==============================
   SECTION HEADERS (Inside forms)
   ============================== */
.section-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #32325d;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.6rem;
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: 0.3px;
}

.section-header i {
    color: #5e72e4;
    margin-right: 0.5rem;
}

.section-header:first-of-type {
    margin-top: 0;
}

/* ==============================
   FORMULARIOS
   ============================== */
.form-control {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    transition: var(--enhanced-transition);
}

.form-control:focus {
    border-color: #5e72e4;
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.12);
}

.form-group label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #525f7f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 1.5px solid #e0e0e0;
}

/* ==============================
   BOTONES
   ============================== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: var(--enhanced-transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    box-shadow: 0 3px 10px rgba(94, 114, 228, 0.25);
}

.btn-success {
    box-shadow: 0 3px 10px rgba(45, 206, 137, 0.25);
}

.btn-info {
    box-shadow: 0 3px 10px rgba(17, 205, 239, 0.25);
}

.btn-danger {
    box-shadow: 0 3px 10px rgba(245, 54, 92, 0.25);
}

.btn-warning {
    box-shadow: 0 3px 10px rgba(251, 99, 64, 0.25);
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.65rem 1.75rem;
    font-size: 0.95rem;
}

/* ==============================
   DATATABLES
   ============================== */
.table thead th {
    border-bottom: 2px solid #f0f2f5 !important;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    color: #8898aa;
    font-weight: 700;
    padding: 12px 15px !important;
    background: #fafbfc;
}

.table tbody td {
    padding: 14px 15px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f0f2f5 !important;
    color: #525f7f;
    font-size: 0.88rem;
}

.table tbody tr:hover {
    background: #f8f9fe !important;
}

.table-hover tbody tr {
    transition: background 0.15s ease;
}

/* DataTable wrapper enhancements */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    padding: 6px 14px;
    background: #f8f9fa;
    transition: var(--enhanced-transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    background: #fff;
    border-color: #5e72e4;
    box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    padding: 5px 12px !important;
    transition: var(--enhanced-transition);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #5e72e4 !important;
    border-color: #5e72e4 !important;
    color: #fff !important;
    border-radius: 6px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e8ecf1 !important;
    border-color: transparent !important;
}

/* ==============================
   KPI / INFO CARDS (Dashboard)
   ============================== */
.kpi-card {
    border-radius: 14px !important;
    border: none !important;
    overflow: hidden;
    transition: var(--enhanced-transition);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12) !important;
}

.kpi-card .icon-shape {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--enhanced-transition);
}

.kpi-card:hover .icon-shape {
    transform: scale(1.05);
}

.kpi-card .icon-shape i {
    font-size: 1.4rem;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-card .kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
    margin-bottom: 2px;
}

/* ==============================
   BADGES / ESTADOS
   ============================== */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ==============================
   ALERTAS
   ============================== */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-dismissible .close {
    top: -6px;
}

/* ==============================
   MODAL
   ============================== */
.modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f2f5;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f0f2f5;
    padding: 1rem 1.5rem;
}

/* ==============================
   BREADCRUMB
   ============================== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #8898aa;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #525f7f;
    font-weight: 600;
}

/* ==============================
   NAV TABS
   ============================== */
.nav-tabs .nav-link {
    font-weight: 600;
    color: #8898aa;
    border: none;
    padding: 0.75rem 1.25rem;
    transition: var(--enhanced-transition);
}

.nav-tabs .nav-link:hover {
    color: #5e72e4;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #5e72e4;
    border-bottom: 2px solid #5e72e4;
    background: transparent;
}

/* ==============================
   SWITCH
   ============================== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #5e72e4;
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ==============================
   MISC
   ============================== */
hr {
    border-top: 1px solid #f0f2f5;
}

.text-dark {
    color: #32325d !important;
}

.shadow-hover {
    transition: var(--enhanced-transition);
}

.shadow-hover:hover {
    box-shadow: var(--enhanced-shadow-hover) !important;
    transform: translateY(-2px);
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f2f5 25%, #e8ecf1 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 6px;
}

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

/* License icon circle */
.license-icon-circle {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    margin-bottom: 1rem;
}

/* License days left alert */
.alert-days-left {
    border-radius: 10px;
}

/* Page transition fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper > .content {
    animation: fadeInUp 0.3s ease-out;
}
