/* ========================================
   MASTER STYLESHEET - K&J Telecomunicaciones
   Archivo CSS unificado para toda la aplicación
   VERSIÓN CORREGIDA - Menu móvil mejorado
   ======================================== */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* Body variants para diferentes páginas */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #0d6efd;
    --secondary: #14b8a6;
    --purple: #667eea;
    --purple-dark: #764ba2;
    --orange: #ff6b35;
    --dark-blue: #0f172a;
    --light-blue: #1e3a8a;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --sidebar-width: 280px;
}

/* ========================================
   NAVBAR STYLES
   ======================================== */

#mainNav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#mainNav.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.navbar-logo {
    height: 45px;
    transition: all 0.3s;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.navbar-nav {
    gap: 5px;
}

.nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 10px 18px !important;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

/* Navbar Divider */
.navbar-divider {
    width: 1px;
    height: 40px;
    background: #e0e0e0;
    margin: 0 15px;
}

/* User Menu in Navbar */
.user-menu-container {
    position: relative;
    margin-left: 10px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-login i {
    font-size: 1.2rem;
}

/* User Button (Logged In) */
.user-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-button:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    color: #333;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-icon {
    color: #666;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.user-button.active .user-dropdown-icon {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 2000;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px 12px 0 0;
}

.user-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.user-dropdown-header p {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

.user-dropdown-section {
    padding: 10px;
}

.user-dropdown-section-title {
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.user-dropdown-item i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.user-dropdown-item .item-text {
    flex: 1;
}

.user-dropdown-item .item-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-dropdown-item .item-desc {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

.user-dropdown-item .badge {
    padding: 3px 8px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 10px 0;
}

.user-dropdown-item.logout {
    color: #dc3545;
}

.user-dropdown-item.logout:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ========================================
   AUTHENTICATION PAGES STYLES
   ======================================== */

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
}

/* Auth Sidebar */
.auth-sidebar {
    flex: 0 0 40%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-sidebar h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.auth-sidebar p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-features {
    margin-top: 40px;
}

.auth-feature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.auth-feature i {
    font-size: 1.5rem;
    margin-right: 15px;
}

/* Auth Main Content */
.auth-main {
    flex: 1;
    padding: 60px 50px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo img {
    height: 60px;
    margin-bottom: 10px;
}

.auth-logo h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* ========================================
   FORM STYLES (Global)
   ======================================== */

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary-custom {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-export {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-excel {
    background: #28a745;
    color: white;
}

.btn-excel:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-pdf {
    background: #dc3545;
    color: white;
}

.btn-pdf:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-view {
    background: #17a2b8;
    color: white;
}

.btn-view:hover {
    background: #138496;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* ========================================
   ALERTS & BADGES
   ======================================== */

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
}

.badge-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* ========================================
   SIDEBAR STYLES (Dashboard/Admin)
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar-header {
    padding: 30px 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    text-align: center;
}

.sidebar-logo h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.sidebar-logo p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* User Profile Card in Sidebar */
.user-profile {
    margin: 25px 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-profile-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar .user-avatar {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-details h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details p {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 20px 15px;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: white;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.sidebar-menu a.active::before {
    transform: scaleY(1);
}

.sidebar-menu i {
    margin-right: 15px;
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Mobile Toggle - MEJORADO */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.mobile-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-bar {
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.top-bar h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(102, 126, 234, 0.08));
    color: #667eea;
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.08));
    color: #28a745;
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.08));
    color: #ffc107;
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(220, 53, 69, 0.08));
    color: #dc3545;
}

.stat-content h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: #1e293b;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Content Card */
.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-section input,
.filter-section select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e293b;
}

.service-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-request {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-request:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* ========================================
   TABLE STYLES
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8fafc;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f8fafc;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 35px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-close {
    cursor: pointer;
    font-size: 1.8rem;
    color: #94a3b8;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #dc3545;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    font-weight: 600;
    color: #333;
}

.detail-value {
    color: #666;
}

/* ========================================
   CHATBOT STYLES
   ======================================== */

.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.chatbot-close {
    cursor: pointer;
    font-size: 1.2rem;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.bot .message-content {
    background: white;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.chat-message.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

.chat-message.bot {
    background: #f0f0f0;
    color: #333;
}

.chat-timestamp {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-indicator {
    display: none;
    padding: 10px;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ========================================
   SERVICE PAGES STYLES
   ======================================== */

/* Hero Section */
.service-hero {
    min-height: 90vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(13, 110, 253, 0.2), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.2), transparent 50%);
}

.service-hero .container {
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.breadcrumb-custom {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.breadcrumb-custom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-custom a:hover {
    color: var(--orange);
}

.breadcrumb-custom span {
    color: var(--orange);
    font-weight: 600;
}

/* Hero Content */
.service-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.service-hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.service-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
}

.hero-feature i {
    color: #4ade80;
    font-size: 1.3rem;
}

.hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-cta-buttons .btn {
    padding: 15px 35px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-cta-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Icon */
.hero-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease 0.8s both;
}

.hero-icon-container > i {
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.signal-waves {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid rgba(20, 184, 166, 0.5);
    border-radius: 50%;
    animation: pulse-wave 2s ease-out infinite;
}

.wave:nth-child(2) {
    animation-delay: 0.7s;
}

.wave:nth-child(3) {
    animation-delay: 1.4s;
}

/* Quick Text Navigation */
.quick-text-nav-integrated {
    margin-top: 25px;
    padding: 15px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
}

.nav-paragraph {
    display: block;
    width: 100%;
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.nav-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.nav-paragraph a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 8px;
    margin: 0 10px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.nav-paragraph a:hover {
    color: #ff6600;
    text-shadow: 0 0 10px rgba(255,102,0,0.5);
    transform: translateY(-1px);
}

/* ===== SERVICE GALLERY ===== */
.service-gallery-section {
    padding: 80px 0;
    background: white;
}

.gallery-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 110, 253, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: white;
    animation: float 2s ease-in-out infinite;
}

.gallery-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-content h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.gallery-content p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== PROBLEM/SOLUTION SECTION ===== */
.problem-solution-section {
    padding: 80px 0;
    background: #f8fafc;
}

.problem-card,
.solution-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.problem-card:hover,
.solution-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.card-icon.problem {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.card-icon.solution {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.problem-card h3,
.solution-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1e293b;
}

.problem-card ul,
.solution-card ul {
    list-style: none;
    padding: 0;
}

.problem-card li,
.solution-card li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.problem-card li i {
    color: #dc2626;
    font-size: 1.2rem;
}

.solution-card li i {
    color: #16a34a;
    font-size: 1.2rem;
}

/* ===== BENEFITS SECTION ===== */
.benefits-section {
    padding: 80px 0;
    background: white;
}

.benefit-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fafc, #e0f2fe);
    transition: all 0.3s ease;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.15);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
}

.benefit-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.benefit-card p {
    color: #64748b;
    line-height: 1.7;
}

/* ===== PROCESS TIMELINE ===== */
.process-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.3);
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    flex: 1;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.timeline-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.timeline-content p {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ===== USE CASES ===== */
.use-cases-section {
    padding: 80px 0;
    background: white;
}

.use-case-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
}

.use-case-card:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05), rgba(20, 184, 166, 0.05));
    transform: translateY(-5px);
}

.use-case-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.use-case-card h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.use-case-card p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* ===== CAROUSEL SECTION ===== */
.carousel-section .container {
    max-width: 600px;
}

.carousel-inner {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.carousel-item {
    height: 500px;
    background-color: #000;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
    opacity: 0.8;
    margin: 0 6px;
    transition: background-color 0.3s ease;
}

.carousel-indicators .active {
    background-color: #007bff;
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    background-size: 50%;
}

/* ===== FINAL CTA SECTION ===== */
.final-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.final-cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.final-cta-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.final-cta-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.final-cta-section .contact-card {
    background: white;
    margin-top: 20px;
}

.final-cta-section .contact-info-side {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.info-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: white;
    font-size: 1.05rem;
}

.info-check-item i {
    color: #4ade80;
    font-size: 1.3rem;
}

.final-cta-section .contact-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.final-cta-section .contact-info-item i {
    font-size: 1.2rem;
    color: var(--secondary);
}

.final-cta-section .btn-light {
    padding: 15px 40px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 50px;
}

.final-cta-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse-wave {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Navbar Responsive */
@media (max-width: 991px) {
    .navbar-divider {
        display: none;
    }

    .user-menu-container {
        margin-left: 0;
        margin-top: 10px;
    }

    .btn-login {
        width: 100%;
        justify-content: center;
    }

    .user-button {
        width: 100%;
        justify-content: space-between;
    }

    .user-dropdown-menu {
        position: relative;
        width: 100%;
        top: 10px;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }

    .navbar-collapse {
        transition: all 0.3s ease;
    }
}

/* Dashboard/Admin Responsive - MEJORADO */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 90px 20px 20px 20px;
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .top-bar h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .card-header > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-export {
        flex: 1;
        margin-right: 0;
        justify-content: center;
    }
}

/* Tablets and below (768px) */
@media (max-width: 768px) {
    /* Auth Pages */
    .auth-container {
        flex-direction: column;
    }

    .auth-sidebar {
        padding: 40px 30px;
    }

    .auth-main {
        padding: 40px 30px;
    }

    /* Service Hero */
    .service-hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }
    
    .service-hero-title {
        font-size: 2rem;
    }
    
    .hero-icon-container {
        display: none;
    }
    
    .hero-cta-buttons {
        flex-direction: column;
    }
    
    .hero-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Timeline */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .timeline-item {
        gap: 20px;
    }
    
    /* Final CTA */
    .final-cta-section h2 {
        font-size: 1.8rem;
    }
    
    .final-cta-section .btn-light {
        width: 100%;
        justify-content: center;
        margin-top: 20px;
    }

    /* Carousel */
    .carousel-section .container {
        max-width: 90%; 
        padding: 0;
    }

    .carousel-item {
        height: 350px;
    }

    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 5px;
    }

    .carousel-content h3 {
        font-size: 1.2rem;
    }
    
    .carousel-content p {
        font-size: 0.9rem;
        display: none;
    }

    .carousel-control-prev, .carousel-control-next {
        width: 10%;
    }

    /* Table responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    .filter-section {
        flex-direction: column;
    }

    .filter-section input,
    .filter-section select {
        width: 100%;
    }
}

/* Small phones (576px and below) */
@media (max-width: 576px) {
    .user-details h4 {
        font-size: 0.95rem;
    }

    .user-details p {
        font-size: 0.75rem;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
    }

    .carousel-item {
        height: 300px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin: 0 auto 15px;
    }

    .mobile-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Desktop: left-align quick nav */
@media (min-width: 992px) {
    .quick-text-nav-integrated {
        text-align: left;
    }
}