/**
 * Estilos Globales - PubliNews Chatbot
 * Color Principal: #60965b
 */

/* ========== Variables CSS ========== */
:root {
    --primary-color: #60965b;
    --primary-dark: #4d7a49;
    --primary-light: #73a86e;
    --secondary-color: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #60965b;
    --info-color: #17a2b8;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(96, 150, 91, 0.2);
}

/* ========== Reset y Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* ========== Tipografía ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ========== Contenedores ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* ========== Botones ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #4a7c47);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a7c47, var(--primary-color));
    box-shadow: 0 4px 12px rgba(96, 150, 91, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(96, 150, 91, 0.2);
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #495057;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #c82333);
    color: var(--secondary-color);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, var(--error-color));
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.3);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ========== Formularios ========== */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:hover {
    border-color: #bbb;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(96, 150, 91, 0.1);
    background-color: #fff;
}

.form-select {
    background-color: #fafafa;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2360965b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 12px;
    padding-right: 45px;
    cursor: pointer;
}

.form-select:hover {
    border-color: #bbb;
    background-color: #fff;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

input[type="file"].form-control {
    padding: 10px;
    cursor: pointer;
}

input[type="file"].form-control::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

input[type="file"].form-control::file-selector-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========== Login Page ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
}

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

.login-logo h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========== Navegación ========== */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 0;
    position: relative;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.notification-badge {
    position: relative;
    cursor: pointer;
}

.notification-badge svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--error-color);
    color: var(--secondary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* ========== Sidebar ========== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 260px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    transition: width 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-toggle {
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-toggle:hover {
    background-color: rgba(96, 150, 91, 0.1);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
    margin-top: 1rem;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar-menu a:hover {
    background-color: rgba(96, 150, 91, 0.1);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: rgba(96, 150, 91, 0.15);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-menu svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .sidebar-menu a {
    padding: 1rem;
}

/* Estilos para submenús */
.menu-item-with-submenu {
    position: relative;
}

.menu-toggle {
    position: relative;
    cursor: pointer;
}

.submenu-arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.menu-item-with-submenu.submenu-open .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(96, 150, 91, 0.05);
}

.menu-item-with-submenu.submenu-open .submenu {
    max-height: 500px;
}

.submenu li {
    margin-bottom: 0;
}

.submenu a {
    padding: 0.75rem 2rem 0.75rem 3rem !important;
    font-size: 0.9rem;
}

.submenu a svg {
    width: 18px;
    height: 18px;
}

.sidebar.collapsed .submenu-arrow {
    display: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu svg {
    margin-right: 0;
}

/* ========== Contenido Principal ========== */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-light);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
}

/* ========== Dashboard Cards ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========== Make it Happen Layout ========== */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chat-container {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 1rem;
}

.chat-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.chat-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.chat-embed {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

/* El componente agent-standard debe ocupar todo el espacio y manejar su scroll interno */
.chat-embed agent-standard {
    width: 100%;
    height: 100%;
    border: none;
}

/* Scrollbar personalizada para el chat */
.chat-embed::-webkit-scrollbar {
    width: 10px;
}

.chat-embed::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.chat-embed::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
    transition: background 0.3s ease;
}

.chat-embed::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox scrollbar */
.chat-embed {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}


.form-container {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    overflow-y: visible;
}

.form-container h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.5rem;
}

/* ========== Tabs del Formulario (Post Web / Post RRSS) ========== */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    margin-top: -0.5rem;
}

.form-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.form-tab-btn:hover {
    color: #60965b;
    background: rgba(96, 150, 91, 0.05);
}

.form-tab-btn.active {
    color: #60965b;
    border-bottom-color: #60965b;
}

.form-tab-btn svg {
    flex-shrink: 0;
}

.form-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-tab-content.active {
    display: block;
}

/* ========== Estilos para formulario RRSS ========== */
.radio-option, .checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-option:hover, .checkbox-option:hover {
    border-color: #60965b;
    background: rgba(96, 150, 91, 0.05);
}

.radio-option input[type="radio"]:checked + span,
.checkbox-option input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #60965b;
}

.radio-option input[type="radio"]:checked,
.checkbox-option input[type="checkbox"]:checked {
    accent-color: #60965b;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-option input[type="checkbox"]:checked ~ .social-icon svg {
    color: #60965b;
}

/* Loading spinner para RRSS */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #60965b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========== Tablas ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(96, 150, 91, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== Alertas ========== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: var(--error-color);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* ========== Indicador de Pasos ========== */
.steps-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    background: linear-gradient(to right, rgba(96, 150, 91, 0.05), rgba(96, 150, 91, 0.02));
    border-radius: 12px;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, rgba(96, 150, 91, 0.2), rgba(96, 150, 91, 0.4), rgba(96, 150, 91, 0.2));
    z-index: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 1;
    background: white;
}

.step.active {
    opacity: 1;
    transform: scale(1.05);
}

.step.completed .step-number {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-dark);
    background-color: var(--bg-white);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step.active .step-number {
    border-color: var(--primary-color);
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #4a7c47);
    box-shadow: 0 4px 12px rgba(96, 150, 91, 0.3);
}

.step-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

.form-step h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid rgba(96, 150, 91, 0.2);
    padding-bottom: 0.75rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Hamburger Button & Mobile Sidebar ========== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 6px;
}

.hamburger-btn:hover {
    background: rgba(96, 150, 91, 0.1);
}

.hamburger-btn svg {
    width: 28px;
    height: 28px;
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-dark);
    z-index: 1001;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.sidebar-close-btn svg {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ========== Mobile Tabs System ========== */
.mobile-tabs {
    display: none;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.5rem;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn svg {
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(96, 150, 91, 0.3);
}

.tab-btn.active svg {
    transform: scale(1.1);
}

/* ========== Footer ========== */
.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    /* Sidebar móvil - Oculto por defecto */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
        padding-top: 60px;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    /* Ajustar menú del sidebar para evitar solapamiento */
    .sidebar-menu {
        margin-top: 0;
        padding-top: 0.5rem;
    }

    /* Mostrar botón de cerrar en móvil */
    .sidebar-close-btn {
        display: block;
        top: 66px;
        right: 1rem;
    }

    /* Ocultar toggle de desktop en móvil */
    .sidebar-toggle {
        display: none;
    }

    /* Mostrar overlay cuando sidebar está abierto */
    .sidebar-overlay {
        display: block;
    }

    /* Mostrar botón hamburguesa en móvil */
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }


    /* Mostrar tabs en móvil */
    .mobile-tabs {
        display: flex;
    }

    /* Layout de tabs en móvil */
    .split-layout {
        grid-template-columns: 1fr;
        height: auto;
        gap: 0;
    }

    /* Paneles en modo tabs */
    .split-layout .chat-container,
    .split-layout .form-container {
        width: 100%;
        max-height: none;
        position: static;
    }

    /* Por defecto, mostrar solo el chat en móvil */
    .split-layout .form-container {
        display: none;
    }

    /* Chat en móvil - altura fija estilo WhatsApp */
    .chat-container {
        padding: 1rem;
        height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
        position: relative;
        top: auto;
    }

    .chat-embed {
        border-width: 1px;
    }

    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Ajustar pasos del formulario en móvil */
    .steps-indicator {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step {
        width: 100%;
    }

    /* Navbar sticky en móvil */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    /* Layout navbar móvil: Hamburguesa | Logo | Notif+User */
    .navbar-container {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    /* Hamburguesa a la izquierda */
    .hamburger-btn {
        order: 1;
        grid-column: 1;
    }

    /* Logo en el centro */
    .navbar-brand {
        order: 2;
        grid-column: 2;
        font-size: 1.1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-img {
        height: 36px;
        max-width: 140px;
    }

    /* Notificaciones y usuario a la derecha */
    .navbar-user {
        order: 3;
        grid-column: 3;
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    /* Ocultar detalles de usuario en móvil */
    .user-details {
        display: none;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Ocultar botón logout en móvil */
    .btn-logout {
        display: none;
    }

    /* Notificaciones compactas */
    .notification-badge svg {
        width: 22px;
        height: 22px;
    }

    .badge-count {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }

    /* Ajustar main-content para compensar navbar sticky */
    .main-content {
        padding: 1rem;
        padding-top: 1rem;
    }

    .dashboard-layout {
        min-height: calc(100vh - 60px);
    }

    /* Mejorar tipografía en móvil */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    /* Mejorar página header en móvil */
    .page-header {
        padding: 1rem;
        text-align: center;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    /* Mejorar botones en móvil */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
    }

    .btn-block {
        width: 100%;
    }

    /* Mejorar formularios en móvil */
    .form-control {
        font-size: 16px;
    }

    .card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Mejorar tablas en móvil */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* Ocultar columnas menos importantes en móvil */
    .hide-mobile {
        display: none;
    }
}

/* ========== Responsive Tablets (769px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .split-layout {
        gap: 1.5rem;
    }

    .chat-container,
    .form-container {
        padding: 1.5rem;
    }

    .navbar-container {
        padding: 1rem 1.5rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

/* ========== Responsive Large Screens (1400px+) ========== */
@media (min-width: 1400px) {
    .split-layout {
        max-width: 1600px;
        margin: 0 auto;
    }

    .main-content {
        max-width: 1600px;
        margin: 0 auto;
    }
}

/* ========== Utilidades ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }
