/* Shelly Monitor - Estilos basados en Maxton Template */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #005bea;
    --primary-rgb: 13, 110, 253;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;
    
    /* Nuevos colores Maxton */
    --sidebar-bg: #ffffff;
    --sidebar-text: #6c757d;
    --sidebar-active: #005bea;
    --body-bg: #f0f3f8;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--body-bg);
    color: #495057;
    min-height: 100vh;
    display: flex;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

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

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--topbar-height);
}

.sidebar .logo {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--sidebar-text);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav .nav-link.active::before {
    transform: scaleY(1);
}

.sidebar-nav .nav-link i {
    font-size: 1.125rem;
    margin-right: 0.875rem;
    width: 20px;
    text-align: center;
}

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #adb5bd;
    letter-spacing: 0.1em;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 50%;
    color: var(--primary);
}

.user-info .avatar i {
    font-size: 1.5rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.user-role {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /*transition: all 0.3s ease;*/
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Topbar */
.topbar {
    background: #ffffff;
    padding: 0 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar .topbar-search {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.topbar .topbar-search input {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.topbar .topbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
    outline: none;
}

.topbar .topbar-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.topbar-actions .topbar-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.topbar-actions .topbar-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.topbar-actions .topbar-icon .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.topbar-title h5 {
    color: #212529;
    font-size: 1.125rem;
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
}

/* Content Container */
.content-container {
    flex: 1;
    padding: 2rem;
}

/* Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    /*transition: all 0.3s ease;*/
    background: #ffffff;
}

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

.card-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-size: 0.9375rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards - Estilo Maxton */
.stat-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--card-shadow);
    /*transition: all 0.3s ease;*/
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 100%);
    opacity: 0;
    /*transition: opacity 0.3s ease;*/
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.stat-primary::before {
    background: linear-gradient(90deg, #005bea 0%, #0a58ca 100%);
}

.stat-card.stat-success::before {
    background: linear-gradient(90deg, #198754 0%, #146c43 100%);
}

.stat-card.stat-warning::before {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%);
}

.stat-card.stat-danger::before {
    background: linear-gradient(90deg, #dc3545 0%, #bb2d3b 100%);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary);
}

.stat-card.stat-primary .stat-icon {
    background: rgba(13, 110, 253, 0.1);
    color: #005bea;
}

.stat-card.stat-success .stat-icon {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.stat-card.stat-warning .stat-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-card.stat-danger .stat-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stat-label {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change i {
    font-size: 0.875rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f9fafb;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Badges - Estilo Maxton */
.badge {
    padding: 0.35rem 0.65rem;
    font-weight: 500;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    line-height: 1;
}

.badge.bg-primary {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #005bea;
}

.badge.bg-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: #198754;
}

.badge.bg-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545;
}

.badge.bg-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    color: #ffc107;
}

.badge.bg-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
    color: #0dcaf0;
}

.badge.bg-secondary {
    background-color: rgba(108, 117, 125, 0.1) !important;
    color: #6c757d;
}

/* Buttons - Estilo Maxton */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.btn-success:hover {
    background: #157347;
    border-color: #146c43;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(25, 135, 84, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #bb2d3b;
    border-color: #b02a37;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

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

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
}

.btn i {
    font-size: 1em;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Alerts - Estilo Maxton */
.alert {
    border-radius: 0.5rem;
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.2);
    color: #146c43;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #bb2d3b;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #997404;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: #087990;
}

/* Device Status - Estilo Maxton */
.device-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2);
}

.status-indicator.offline {
    background: var(--secondary);
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
    }
}

/* Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 3rem;
    color: var(--primary);
}

.auth-logo h3 {
    margin-top: 1rem;
    color: #111827;
}

/* Breadcrumb - Estilo Maxton */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: #adb5bd;
}

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

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.05);
}

.progress-bar {
    border-radius: 10px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    /* Desactivado: evita fade al entrar a las vistas */
    animation: none !important;
}

/* Scrollbar Styling */
.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Mobile menu toggle button */
#mobileMenuToggle {
    display: none;
    position: relative;
    z-index: 1051;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
}

#mobileMenuToggle i {
    font-size: 1.5rem;
}

/* DataTables Responsive Improvements */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: var(--primary);
    border: none;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: var(--danger);
}

/* DataTables custom controls layout */
.dt-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dt-length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dt-length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
}

.dt-length select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.dt-search {
    flex: 1;
    min-width: 200px;
}

.dt-search label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.dt-search input {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.dt-bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dt-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.dt-pagination {
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    #mobileMenuToggle {
        display: inline-flex !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1050;
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
        transition: transform 0.2s ease-out;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    /* Backdrop para cuando el menú esté abierto */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1049;
        display: none;
    }
    .sidebar-backdrop.active { display: block; }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .topbar {
        padding: 0 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* DataTables móvil - Layout mejorado */
    .dt-top-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .dt-length,
    .dt-search {
        width: 100%;
        min-width: 0;
    }
    
    .dt-length label {
        justify-content: center;
        font-size: 0.875rem;
    }
    
    .dt-length select {
        max-width: 80px;
    }
    
    .dt-search label {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        text-align: center;
        font-size: 0.875rem;
    }
    
    .dt-search input {
        width: 100%;
    }
    
    .dt-bottom-controls {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .dt-info,
    .dt-pagination {
        width: 100%;
        justify-content: center;
    }
    
    /* Hacer las cards más compactas en móvil */
    .card-body {
        padding: 1rem;
    }
    
    /* Botones más pequeños en móvil */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Reducir tamaño de fuente en tablas */
    table.dataTable {
        font-size: 0.875rem;
    }
    
    table.dataTable thead th {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    table.dataTable tbody td {
        padding: 0.5rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

/* Modal Improvements */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* Utility Classes */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-warning { background-color: var(--warning) !important; }

.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

.rounded-lg { border-radius: 0.75rem !important; }
.rounded-xl { border-radius: 1rem !important; }

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

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
}

/* Chart Container */
.chart-container {
    position: relative;
    min-height: 300px;
}

/* Smooth Page Transitions */
.fade-in {
    /* Desactivado: evita fade al entrar a las vistas */
    animation: none !important;
}

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

/* Hover Effect for Cards */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Status Badge Animation */
@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-blink {
    animation: statusBlink 2s infinite;
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

/* Icon Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.icon-spin {
    animation: spin 2s linear infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar for Content */
.content-container::-webkit-scrollbar {
    width: 8px;
}

.content-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.content-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.content-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Code Blocks */
code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #e83e8c;
}

/* Activity Timeline */
.activity-item {
    position: relative;
}

.activity-item::after {
    content: '';
    position: absolute;
    left: -15px;
    top: 5px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .footer,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ============================================ */
/* Maxton Login Page Styles */
/* ============================================ */

/* Body override for login page */
body:has(.maxton-login-container) {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: block !important;
    background-color: #ffffff !important;
}

.maxton-login-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    background: #ffffff;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Left Side - Illustration */
.login-illustration {
    flex: 0 0 60%;
    width: 60%;
    max-width: 60%;
    background: #e8eaf0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.illustration-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Phone Frame */
.phone-frame {
    width: 280px;
    height: 500px;
    background: #374151;
    border-radius: 30px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-15deg);
    z-index: 2;
}

.phone-screen {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 70px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border-radius: 20px;
    overflow: hidden;
}

.phone-screen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
    border-radius: 50%;
    opacity: 0.3;
}

.phone-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #1f2937;
    border-radius: 50%;
    border: 3px solid #4b5563;
}

/* Flowers */
.flower {
    position: absolute;
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    z-index: 1;
}

.flower-1 {
    bottom: 15%;
    left: 10%;
    font-size: 5rem;
    animation-delay: 0s;
}

.flower-2 {
    bottom: 20%;
    left: 3%;
    font-size: 3rem;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Right Side - Login Form */
.login-form-container {
    flex: 0 0 40%;
    width: 40%;
    max-width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
    min-height: 100vh;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Logo */
.maxton-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Title */
.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.375rem;
}

.login-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    gap: 1rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #374151;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-social:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-social svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.divider-container {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider-text {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Styles */
.login-form .form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.login-form .form-control {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.login-form .form-control:focus {
    border-color: #00c6fb;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #6b7280;
}

/* Remember Me & Forgot Password */
.form-check-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.forgot-password-link {
    color: #00c6fb;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #5568d3;
}

/* Gradient Button */
.btn-gradient {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    transform: translateY(-2px);
    color: white;
}

.btn-gradient:active {
    transform: translateY(0);
}

/* Sign Up Link */
.signup-link {
    font-size: 0.9375rem;
}

.signup-link a {
    color: #00c6fb;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.signup-link a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Demo Credentials */
.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
    .login-illustration {
        display: none;
    }
    
    .login-form-container {
        flex: auto;
    }
}

@media (max-width: 576px) {
    .login-form-container {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .phone-mockup i {
        font-size: 10rem;
    }
    
    .social-login {
        flex-direction: column;
    }
}
