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

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* Centrar contenido solo en la página de login */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrap {
    width: 100%;
    max-width: 28rem;
}

.login-content {
    background: #0055a4;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-logo {
    text-align: center;
    padding: 20px 20px;
}

.login-logo img {
    max-width: 160px;
    height: auto;
}

.login-logo h3 {
    color: #000;
    font-size: 24px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 5px;
}

.login-logo p {
    color: #000;
    font-size: 14px;
    margin-bottom: 0;
}

.login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.au-input {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    font-size: 14px;
    color: #555;
    transition: all 0.3s;
}

.au-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.au-btn {
    width: 100%;
    height: 50px;
    background: #E30613;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.au-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.alert {
    border-radius: 5px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.login-form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.login-form-footer p {
    color: #fff;
    font-size: 13px;
    margin: 0;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.input-group .au-input {
    padding-left: 45px;
}

@media (max-width: 576px) {
    .login-form {
        padding: 30px 20px;
    }

    .login-logo {
        padding: 30px 20px 15px;
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #0055a4;
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
}

.sidebar-logo img {
    height: 40px;
    width: auto;
}

.sidebar-logo i {
    font-size: 28px;
    margin-right: 12px;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 25px;
    letter-spacing: 1px;
}

.menu-item {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* User Info in Sidebar */
.sidebar-user {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.2);
    margin: 10px 15px;
    border-radius: 8px;
}

.sidebar-user-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Selector de cliente para admins */
.ct-client-selector {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

.ct-client-selector:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.ct-client-selector:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ct-client-selector option {
    background: #0055a4;
    color: white;
}

/* Main Content Area */
.page-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Top Header */
.page-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: #0055a4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.menu-toggle {
    display: none;
    background: #0055a4;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

/* Main Content */
.main-content {
    padding: 30px;
}

.welcome-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-section h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-section p {
    color: #666;
    font-size: 15px;
    margin-bottom: 0;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    border-left: 4px solid;
}

.stat-card.primary {
    border-left-color: #667eea;
}

.stat-card.success {
    border-left-color: #11998e;
}

.stat-card.warning {
    border-left-color: #f5576c;
}

.stat-card.info {
    border-left-color: #4facfe;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 15px;
}

.stat-card-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-icon.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card-icon.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card-icon.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-card p {
    color: #888;
    font-size: 14px;
    margin-bottom: 0;
}

/* Content Sections */
.content-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #667eea;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        left: -260px;
    }

    .sidebar.active {
        left: 0;
    }

    .page-wrapper {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .main-content {
        padding: 20px 15px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 15px;
    }

    .page-title {
        font-size: 18px;
    }

    .stat-card {
        margin-bottom: 15px;
    }
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-control:focus {
    border-color: #0055a4;
    box-shadow: 0 0 0 0.2rem rgba(0, 85, 164, 0.15);
}

.form-control:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.btn-primary {
    background: #0055a4;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #003d75;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 85, 164, 0.3);
}

.btn-warning {
    background: #f5a623;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    color: white;
    transition: all 0.3s;
}

.btn-warning:hover {
    background: #e09612;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
    color: white;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* MAHIA Chat Styles */
.mahia-full-height {
    height: calc(100vh - 140px) !important;
    max-height: calc(100vh - 140px) !important;
    margin-bottom: 0 !important;
    min-height: 0;
    overflow: hidden;
}

.mahia-full-height > [class*="col-"] {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.mahia-chat-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mahia-chat-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mahia-logo {
    max-height: 40px;
    height: auto;
    max-width: 200px;
}

#clearChatButton {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    transition: all 0.3s ease;
}

#clearChatButton:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.05);
}

#clearChatButton i {
    font-size: 12px;
}

.mahia-chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #f8f9fa;
    overflow: hidden;
    min-height: 0;
}

.mahia-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mahia-chat-messages > * {
    margin-bottom: 15px;
}

.mahia-sidebar-height {
    height: 100%;
}

.mahia-message {
    display: flex;
    animation: fadeIn 0.3s ease-in;
    max-width: 75%;
}

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

.mahia-message.mahia-bot {
    align-self: flex-start;
}

.mahia-message.mahia-user {
    align-self: flex-end;
}

.mahia-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mahia-bot .mahia-avatar {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
    margin-right: 10px;
}

.mahia-user .mahia-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 10px;
}

.mahia-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.mahia-bot .mahia-message-content {
    border-bottom-left-radius: 4px;
}

.mahia-user .mahia-message-content {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.mahia-message-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mahia-message-content p {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
}

.mahia-chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.mahia-chat-input .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.mahia-chat-input .form-control {
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    background: #f8f9fa;
}

.mahia-chat-input .form-control:focus {
    box-shadow: none;
    border-color: transparent;
    background: white;
}

.mahia-chat-input .btn-primary {
    padding: 14px 25px;
    border-radius: 0;
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
}

.mahia-chat-input .btn-primary:hover {
    background: linear-gradient(135deg, #003d75 0%, #002855 100%);
    transform: none;
}

.mahia-chat-input .btn-primary:disabled {
    opacity: 0.6;
}

/* Typing Indicator */
.mahia-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.mahia-typing span {
    width: 8px;
    height: 8px;
    background: #0055a4;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.mahia-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.mahia-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Scrollbar para el chat */
.mahia-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.mahia-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mahia-chat-messages::-webkit-scrollbar-thumb {
    background: #0055a4;
    border-radius: 4px;
}

.mahia-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #003d75;
}

/* Responsive para chat */
@media (max-width: 768px) {
    .mahia-message {
        max-width: 85%;
    }
}

/* ============================================
   MAINTENANCE STYLES
   ============================================ */

.maintenance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-card.pending {
    border-left: 4px solid #ffc107;
}

.stat-card.completed {
    border-left: 4px solid #28a745;
}

.stat-card.incident {
    border-left: 4px solid #dc3545;
}

.stat-card.total {
    border-left: 4px solid #0055a4;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.filter-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.filter-tab:hover {
    color: #0055a4;
}

.filter-tab.active {
    color: #0055a4;
    border-bottom-color: #0055a4;
}

.maintenance-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.maintenance-table table {
    width: 100%;
    border-collapse: collapse;
}

.maintenance-table thead {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
}

.maintenance-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.maintenance-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

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

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

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.incident {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-yes {
    background-color: #d4edda;
    color: #155724;
}

.badge-no {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-view {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    margin-right: 20px;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #0055a4;
    color: white;
    border-color: #0055a4;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #0055a4;
    color: white;
    border-color: #0055a4;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.maintenance-detail {
    padding: 10px 0;
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label i {
    color: #0055a4;
    width: 20px;
}

.detail-value {
    color: #212529;
    font-size: 15px;
    padding-left: 28px;
}

.observations-text {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #0055a4;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.maintenance-detail-loading {
    padding: 40px 0;
}

#maintenanceModal .modal-header {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
}

#maintenanceModal .modal-header .btn-close {
    filter: invert(1);
}

#maintenanceModal .modal-title i {
    margin-right: 8px;
}

/* ============================================
   SUPPORT TICKETS STYLES
   ============================================ */

.support-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.support-stats .stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border-left: 4px solid;
}

.support-stats .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.stat-card.stat-total {
    border-left-color: #0055a4;
}

.stat-card.stat-open {
    border-left-color: #17a2b8;
}

.stat-card.stat-pending {
    border-left-color: #ffc107;
}

.stat-card.stat-waiting {
    border-left-color: #fd7e14;
}

.stat-card.stat-closed {
    border-left-color: #28a745;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.stat-total .stat-icon {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
}

.stat-open .stat-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-pending .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.stat-waiting .stat-icon {
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
}

.stat-closed .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.stat-content {
    flex: 1;
}

.support-filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label i {
    margin-right: 5px;
    color: #0055a4;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #0055a4;
    box-shadow: 0 0 0 3px rgba(0, 85, 164, 0.1);
}

.filter-reset {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.support-tickets-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
}

.tickets-table thead {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
}

.tickets-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tickets-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    vertical-align: middle;
}

.tickets-table tbody tr {
    transition: all 0.3s;
}

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

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

.ticket-id {
    font-family: monospace;
    font-size: 16px;
    color: #0055a4;
    white-space: nowrap;
}

.badge-duplicate {
    display: inline-block;
    padding: 2px 6px;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 5px;
}

.category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ticket-description {
    max-width: 300px;
    line-height: 1.5;
    color: #495057;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-open {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-waiting {
    background-color: #f8d7da;
    color: #721c24;
}

.status-closed {
    background-color: #d4edda;
    color: #155724;
}

.assigned-users {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #495057;
    font-size: 13px;
}

.assigned-users i {
    color: #0055a4;
}

.ticket-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-time {
    font-size: 12px;
    color: #6c757d;
}

.btn-view-ticket {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-view-ticket:hover {
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: #6c757d;
}

/* Pagination for Support Tickets */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Ticket Details */
#ticketModal .modal-header {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
}

#ticketModal .modal-header .btn-close {
    filter: invert(1);
}

.ticket-detail-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-detail {
    padding: 10px 0;
}

.ticket-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.ticket-id-large {
    font-family: monospace;
    font-size: 32px;
    font-weight: bold;
    color: #0055a4;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h6 {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h6 i {
    color: #0055a4;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-item div {
    font-size: 14px;
    color: #212529;
}

.description-text,
.resolution-text,
.additional-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #0055a4;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    color: #212529;
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assigned-user-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.assigned-user-item i {
    color: #0055a4;
}

.ticket-history {
    margin-top: 20px;
}

.history-timeline {
    position: relative;
    padding-left: 30px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.history-item {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.history-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.history-icon {
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0055a4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #0055a4;
}

.history-content {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #0055a4;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}

.history-header strong {
    color: #0055a4;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.history-header .text-muted {
    font-size: 12px;
}

.history-user {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.history-text {
    font-size: 14px;
    color: #212529;
    line-height: 1.5;
    margin-top: 8px;
    white-space: pre-wrap;
}

.history-notes {
    font-size: 13px;
    margin-top: 8px;
    font-style: italic;
}

/* Responsive for Support Tickets */
@media (max-width: 768px) {
    .support-stats {
        grid-template-columns: 1fr;
    }
    
    .support-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    
    .tickets-table {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 10px 8px;
    }
    
    .ticket-description {
        max-width: 200px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
}

/* ============================================
   CONFIGURACIÓN (CONFIG)
   ============================================ */

/* Pestañas de Configuración */
.config-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
}

.config-tab {
    padding: 12px 24px;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-tab:hover {
    color: #0055a4;
    background: #f8f9fa;
}

.config-tab.active {
    color: #0055a4;
    border-bottom-color: #0055a4;
    background: white;
}

.config-tab i {
    font-size: 16px;
}

/* Contenido de Pestañas */
.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Sección de Configuración */
.config-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h4 i {
    color: #0055a4;
}

/* Tabla de Configuración */
.config-section .table {
    margin-top: 20px;
}

.config-section .table thead {
    background: linear-gradient(135deg, #0055a4 0%, #003d75 100%);
    color: white;
}

.config-section .table thead th {
    border: none;
    padding: 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.config-section .table tbody tr {
    transition: background-color 0.2s ease;
}

.config-section .table tbody tr:hover {
    background-color: #f8f9fa;
}

.config-section .table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* Botones de Acción */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
}

.action-buttons .btn {
    padding: 5px 10px;
    font-size: 13px;
}

/* Responsive para Configuración */
@media (max-width: 768px) {
    .config-tabs {
        flex-direction: column;
    }
    
    .config-tab {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .section-header .btn {
        width: 100%;
    }
}

/* ============================================
   NEWS FRONTEND (InfoService)
   ============================================ */

/* Contenedor de noticias */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.empty-state p {
    color: #adb5bd;
}

/* Tarjeta de noticia */
.news-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.news-card.unread {
    border-left-color: #0055a4;
    background: linear-gradient(to right, #f0f7ff 0%, white 50px);
}

.news-card.read {
    border-left-color: #28a745;
}

.news-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Cabecera de la noticia */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.news-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge-unread {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0055a4;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    animation: pulse 2s infinite;
}

.badge-unread i {
    font-size: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.news-title {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.news-date {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-date i {
    color: #0055a4;
}

/* Cuerpo de la noticia */
.news-body {
    margin-bottom: 15px;
}

.news-pdf {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.news-pdf > i {
    font-size: 32px;
    color: #dc3545;
}

.pdf-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pdf-label {
    color: #495057;
    font-weight: 500;
}

/* Pie de la noticia */
.news-footer {
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
}

.news-footer small {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-footer i {
    color: #28a745;
}

/* Responsive para noticias */
@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
    }
    
    .news-date {
        width: 100%;
    }
    
    .news-pdf {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-info {
        flex-direction: column;
        text-align: center;
    }
    
    .news-title {
        font-size: 18px;
    }
}

/* Estilo para filas de tabla no leídas */
.tickets-table tr.unread-row {
    background: linear-gradient(to right, #f0f7ff 0%, white 100px);
    font-weight: 500;
}

.tickets-table tr.unread-row:hover {
    background: linear-gradient(to right, #e3f2fd 0%, #f8f9fa 100px);
}

/* ========================
   USERS MANAGEMENT SECTION
   ======================== */

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.users-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.users-filters label {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.users-filters .form-select {
    min-width: 250px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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




