/* Variables */
:root {
    --primary: #4e73df;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --sidebar-width: 14rem;
    --sidebar-width-collapsed: 6.5rem;
    --topbar-height: 4.375rem;
    --footer-height: 4rem;
}

/* General Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --info-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Layout Base */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

#content-wrapper {
    width: 100%;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background-color: var(--light);
    transition: margin 0.3s ease-in-out;
}

#content {
    flex: 1;
    padding: 1.5rem;
    background: #edf2f7;
}

.container-fluid {
    padding: 0 1.5rem;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e2a4a 10%, #151c2e 100%);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: all 0.2s;
    overflow-y: auto;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
    z-index: 1;
    color: #fff;
    display: flex;
    align-items: center;
}

.sidebar-brand .sidebar-brand-icon {
    font-size: 1.2rem;
}

.sidebar-brand .sidebar-brand-text {
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1rem;
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    font-size: 0.9rem;
}

.sidebar .nav-item .nav-link i {
    font-size: 0.9rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link:active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item .nav-link:hover i {
    color: #fff;
}

.sidebar .nav-item.active .nav-link {
    color: #fff;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item.active .nav-link i {
    color: #fff;
}

.sidebar-heading {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1.2rem 1rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: #fff;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
}

.topbar .navbar {
    height: var(--topbar-height);
    padding: 0 1rem;
}

.topbar .navbar-nav {
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: auto;
}

.topbar .nav-item {
    position: relative;
}

.topbar .nav-link {
    display: flex;
    align-items: center;
    height: var(--topbar-height);
    padding: 0 0.75rem;
    color: #858796;
}

.topbar .nav-link:focus,
.topbar .nav-link:hover {
    color: #6e707e;
}

.topbar .dropdown {
    position: static;
}

.topbar .dropdown-menu {
    position: absolute;
    right: 1rem;
    width: auto;
    border: none;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    border-radius: 0.35rem;
    padding: 0.5rem 0;
}

.topbar .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 400;
    color: #3a3b45;
}

.topbar .dropdown-item:hover {
    background-color: #f8f9fc;
    color: #3a3b45;
}

.topbar .dropdown-item i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
    color: #b7b9cc;
}

.topbar .dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #eaecf4;
}

.topbar .img-profile {
    height: 2rem;
    width: 2rem;
    border: 1px solid #eaecf4;
}

.topbar .user-name {
    margin-right: 0.5rem;
    color: #5a5c69;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Fix for dropdown toggle arrow */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-toggle-no-arrow::after {
    display: none;
}

/* Cards */
.card {
    position: relative;
    border: none;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header, .card-header h6,
.table-card .card-header, .table-card .card-header h6,
.activity-card .card-header, .activity-card .card-header h6 {
    color: #fff !important;
    background: linear-gradient(45deg, #4f46e5, #6366f1) !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
    border: none;
}

.card-body {
    padding: 1.25rem;
}

/* Statistics Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px 20px 20px 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    color: #333;
    transition: box-shadow 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.stat-card.transactions {
    background: linear-gradient(90deg, #36b9cc 0%, #2c9faf 100%);
    color: #fff;
}

.stat-card.amount {
    background: linear-gradient(90deg, #1cc88a 0%, #17a673 100%);
    color: #fff;
}

.stat-card.clients {
    background: linear-gradient(90deg, #4e73df 0%, #224abe 100%);
    color: #fff;
}

.stat-card.pending {
    background: linear-gradient(90deg, #fd7e14 0%, #f6c23e 100%);
    color: #fff;
}

.stat-card .stat-title {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: none;
}

.stat-card .stat-value {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
    line-height: 1.2;
}

.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 2.5rem;
    opacity: 0.15;
    color: #ffffff;
}

/* Border Cards */
.border-left-primary {
    border-left: 4px solid var(--primary);
}

.border-left-success {
    border-left: 4px solid var(--success);
}

.border-left-info {
    border-left: 4px solid var(--info);
}

.border-left-warning {
    border-left: 4px solid var(--warning);
}

/* Tables */
.table-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

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

/* Forms */
.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(45deg, #4f46e5, #6366f1);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(45deg, #7c3aed, #8b5cf6);
    color: #fff;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #6d28d9, #7c3aed);
    transform: translateY(-1px);
}

.btn-icon {
    padding: 0.375rem;
    line-height: 1;
}

.btn-icon i {
    font-size: 0.875rem;
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-info { color: var(--info) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success {
    background: linear-gradient(45deg, #059669, #10b981) !important;
    color: #fff;
}
.bg-info { background-color: var(--info) !important; }
.bg-warning {
    background: linear-gradient(45deg, #d97706, #fbbf24) !important;
    color: #fff;
}
.bg-danger {
    background: linear-gradient(45deg, #dc2626, #ef4444) !important;
    color: #fff;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e3e6f0;
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
}

.timeline-content {
    margin-left: 40px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }

    .sidebar .nav-item .nav-link span {
        display: none;
    }

    .sidebar .sidebar-brand .sidebar-brand-text {
        display: none;
    }

    .content-wrapper {
        margin-left: var(--sidebar-width-collapsed);
    }

    .sidebar.toggled {
        width: var(--sidebar-width);
    }

    .sidebar.toggled .nav-item .nav-link span {
        display: inline;
    }

    .sidebar.toggled .sidebar-brand .sidebar-brand-text {
        display: inline;
    }

    .content-wrapper.toggled {
        margin-left: var(--sidebar-width);
    }
}

/* Toggle Sidebar */
.sidebar-toggled .sidebar {
    width: 6.5rem !important;
}

.sidebar-toggled .sidebar .nav-link {
    text-align: center;
    padding: 0.75rem 1rem;
}

.sidebar-toggled .sidebar .nav-link span {
    display: none;
}

.sidebar-toggled .sidebar .nav-link i {
    margin-right: 0;
    font-size: 1.1rem;
}

.sidebar-toggled .sidebar-brand-text {
    display: none;
}

.sidebar-toggled .sidebar-brand {
    justify-content: center;
}

.sidebar-toggled .sidebar-brand-icon {
    margin-right: 0;
}

.sidebar-toggled #content-wrapper {
    margin-left: 6.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Statistics cards */
.card .h4 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card .small {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.card .fa-2x {
    font-size: 2rem;
}

/* Button customization */
.btn-group .btn {
    margin: 0 2px;
}

/* Status Badges */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 3px;
}

.badge.bg-warning {
    background: #d97706 !important;
}

.badge.bg-success {
    background: #16a34a !important;
}

.badge.bg-danger {
    background: #dc2626 !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-right: 2.5rem;
    border-radius: 0.35rem;
    border: 1px solid #e3e6f0;
    font-size: 0.875rem;
}

.search-box i {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #858796;
}

/* Pagination */
.pagination {
    margin: 1rem;
    justify-content: flex-end;
}

.page-link {
    padding: 0.5rem 0.75rem;
    color: var(--dark);
    background-color: #fff;
    border: 1px solid #e3e6f0;
    font-size: 0.875rem;
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    color: #858796;
    background-color: #fff;
    border-color: #e3e6f0;
}

/* Sidebar Toggled */
.sidebar.toggled {
    width: var(--sidebar-width-collapsed);
}

.sidebar.toggled .nav-item .nav-link {
    text-align: center;
    padding: 0.75rem 1rem;
}

.sidebar.toggled .nav-item .nav-link i {
    margin-right: 0;
    font-size: 1.1rem;
}

.sidebar.toggled .nav-item .nav-link span {
    display: none;
}

.sidebar.toggled .sidebar-brand .sidebar-brand-text {
    display: none;
}

.sidebar.toggled .sidebar-heading {
    text-align: center;
    padding: 0.5rem;
}

/* Content Wrapper */
.content-wrapper {
    margin-left: var(--sidebar-width);
    transition: all 0.2s;
}

.content-wrapper.toggled {
    margin-left: var(--sidebar-width-collapsed);
}

/* Page Headers */
.d-sm-flex {
    margin-bottom: 1.5rem;
}

.h3 {
    font-weight: 700;
    color: #1a202c;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Page Headers */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Activity Card */
.activity-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.activity-card .card-header {
    background: #fff;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.activity-card .card-header h6 {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-content {
    color: #1e293b;
    font-size: 0.875rem;
}

.activity-item .activity-time {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.navbar-nav .nav-item.dropdown .nav-link {
    padding: 0.5rem 1rem;
    color: #4e73df;
}

.navbar-nav .nav-item.dropdown .nav-link:hover {
    color: #2e59d9;
}

.img-profile {
    height: 2rem;
    width: 2rem;
    border: 2px solid #eaecf4;
}

.topbar .dropdown .dropdown-menu {
    width: auto;
    min-width: 13rem;
    font-size: 0.85rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.topbar .dropdown-list .dropdown-item:active {
    background-color: #4e73df;
    color: #fff;
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    padding: 0.5rem 1rem;
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

.dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #4e73df;
}

.text-gray-600 {
    color: #858796 !important;
}

.card-header .text-primary {
    color: #fff !important;
}

.bg-purple {
    background: linear-gradient(45deg, #8e44ad, #9b59b6) !important;
    color: #fff;
} 

/* Breadcrumbs modernos para dashboard */
.breadcrumb {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
    font-weight: bold;
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: #4e73df;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #2e59d9;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #232b3e;
    font-weight: bold;
}

/* Ajustar padding interno para las tarjetas estadísticas */
.stat-card .card-body {
    padding: 0.75rem 1rem;
}

/* Mobile adjustments */
@media (max-width: 575.98px) {
    .stat-card {
        padding: 16px 10px 16px 10px;
        font-size: 0.95rem;
    }
    .stat-card .stat-title {
        font-size: 0.95rem;
    }
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    .stat-card .stat-icon {
        font-size: 1.5rem;
        right: 10px;
        bottom: 10px;
    }
} 