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

body, body.nav-md, .container.body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #172554) !important;
    background-size: 400% 400% !important;
    animation: gradientBG 15s ease infinite !important;
    color: #e2e8f0;
    margin: 0;
    min-height: 100vh;
}

/* Solo para el body del login centrar todo */
body.login {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   LOGIN SPECIFIC STYLES
========================================= */
.glass-container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-5px);
}

.logo-container img {
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    border: 2px solid rgba(255,255,255,0.1);
}

h2.app-title {
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

h1.company-title {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control.glass-input {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    padding: 0.8rem 1rem 0.8rem 2.5rem !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-control.glass-input:focus {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.3) !important;
    outline: none !important;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.2rem;
    color: #64748b;
    transition: color 0.3s ease;
}

.form-control.glass-input:focus + .input-icon {
    color: #60a5fa;
}

.btn-premium {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    width: 100%;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(99, 102, 241, 1);
    background: linear-gradient(135deg, #60a5fa, #818cf8);
    color: white;
}

.separator-premium {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

.separator-premium a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.separator-premium a:hover {
    color: #c4b5fd;
}

/* =========================================
   GLOBAL OVERRIDES (PREMIUM GLASSMORPHISM)
========================================= */
.container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* =========================================
   DASHBOARD OVERRIDES (GENTELELLA)
========================================= */

/* Main Content Area */
.right_col {
    background: transparent !important;
}

/* Sidebar */
.left_col, .nav_title, .scroll-view {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255,255,255,0.05) !important;
}

.sidebar-footer {
    background: rgba(15, 23, 42, 0.9) !important;
}
.sidebar-footer a {
    background: transparent !important;
    color: #94a3b8 !important;
}
.sidebar-footer a:hover {
    color: #fff !important;
}

.nav.side-menu>li>a {
    color: #cbd5e1 !important;
    font-weight: 500;
}
.nav.side-menu>li>a:hover, .nav.side-menu>li.active>a {
    background: linear-gradient(90deg, rgba(59,130,246,0.1), transparent) !important;
    color: #60a5fa !important;
    box-shadow: inset 4px 0 0 #60a5fa !important;
    text-shadow: none !important;
}
.nav.child_menu {
    background: rgba(0,0,0,0.2) !important;
}
.nav.child_menu li:hover {
    background: rgba(255,255,255,0.05) !important;
}
.nav.child_menu li a {
    color: #94a3b8 !important;
}
.nav.child_menu li a:hover {
    color: #f8fafc !important;
}

/* Top Navigation */
.top_nav .nav_menu {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.top_nav .nav_menu a {
    color: #e2e8f0 !important;
}
.top_nav .nav_menu a:hover {
    color: #60a5fa !important;
}
.dropdown-menu {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}
.dropdown-item {
    color: #cbd5e1 !important;
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.05) !important;
    color: #fff !important;
}

/* Headings & Text */
.page-title .title_left h3 {
    color: #f8fafc !important;
    font-weight: 600;
}
.page-title small {
    color: #94a3b8 !important;
}

/* Dashboard Widgets & Cards */
.card {
    background: rgba(30, 41, 59, 0.4) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #e2e8f0 !important;
}
.card-header {
    background: rgba(15, 23, 42, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
    font-weight: 600;
}
.card-header h6 {
    margin: 0;
    color: #f8fafc !important;
}
.nav-tabs .nav-link {
    color: #94a3b8 !important;
}
.nav-tabs .nav-link.active {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255,255,255,0.1) rgba(255,255,255,0.1) transparent !important;
    color: #60a5fa !important;
}

.tile_count .tile_stats_count {
    background: rgba(30, 41, 59, 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5) !important;
    color: #e2e8f0 !important;
}
.tile_count .tile_stats_count:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.4) !important;
    background: rgba(30, 41, 59, 0.7) !important;
}
.tile_count .tile_stats_count .count_top {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}
.tile_count .tile_stats_count .count {
    color: #f8fafc !important;
    font-weight: 700 !important;
}

/* Panels (Tables, Forms) */
.x_panel {
    background: rgba(30, 41, 59, 0.5) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 0 !important; /* Remover linea verde o colores laterales de Gentelella */
    border-top: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5) !important;
    color: #e2e8f0 !important;
    margin-bottom: 2rem !important;
    width: 100% !important; /* Asegurar que ocupe todo el espacio de la columna */
    display: block !important;
}
.x_title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 1rem !important;
    margin-bottom: 1rem !important;
}
.x_title h4 {
    color: #f8fafc !important;
    font-weight: 600;
}

/* Forms */
.form-control {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
}
.form-control:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.2) !important;
}
label {
    color: #cbd5e1 !important;
}

/* Tables */
table.table {
    color: #cbd5e1 !important;
}
table.table th {
    background: rgba(15, 23, 42, 0.7) !important;
    border-color: rgba(255,255,255,0.05) !important;
    color: #60a5fa !important;
    font-weight: 600 !important;
}
table.table td {
    border-color: rgba(255,255,255,0.05) !important;
    vertical-align: middle !important;
}
table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}
table.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Buttons overriding */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
}
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
}
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: none !important;
    color: white !important;
}
.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border: none !important;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
}
.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}

/* Footer */
footer {
    background: transparent !important;
    color: #94a3b8 !important;
}
