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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #00bfa5 0%, #00897b 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Navbar Styles */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    flex-direction: column;
}

.navbar-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #00bfa5;
    letter-spacing: -0.5px;
}

.navbar-logo-subtitle {
    font-size: 11px;
    color: #666;
    font-weight: 300;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-item {
    list-style: none;
}

.navbar-item-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-user {
    color: #00bfa5;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    background: #e0f7f4;
}

.navbar-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-link:hover {
    background: #e0f7f4;
    color: #00bfa5;
}

.navbar-link.active {
    background: #00bfa5;
    color: white;
}

#logoutBtn {
    color: #d32f2f;
}

#logoutBtn:hover {
    background: #ffebee;
    color: #c62828;
}

/* Main Content */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
}

.container-wide {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
    max-width: 95%;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.logo-container {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    font-size: 42px;
    font-weight: 700;
    color: #00bfa5;
    letter-spacing: -1px;
}

.logo-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-weight: 300;
}

h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
}

.info-toggle {
    text-align: center;
    margin-bottom: 30px;
}

.info-toggle-btn {
    background: none;
    border: none;
    color: #00bfa5;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 10px;
    transition: color 0.3s;
    width: auto;
    margin: 0;
}

.info-toggle-btn:hover {
    color: #00897b;
    transform: none;
    box-shadow: none;
}

.info-box {
    background: #e0f7f4;
    border-left: 4px solid #00bfa5;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #00897b;
    line-height: 1.6;
    display: none;
}

.info-box.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

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

.form-label {
    display: block;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.switch-container:hover {
    border-color: #00bfa5;
    background: #f0faf9;
}

.switch-label {
    font-weight: 600;
    color: #666;
    font-size: 17px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00bfa5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.date-range {
    margin-top: 25px;
    padding: 0;
    animation: slideDown 0.3s ease;
}

.date-range.hidden {
    display: none;
}

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

.date-label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

input[type="date"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    margin-bottom: 20px;
}

input[type="date"]:focus {
    outline: none;
    border-color: #00bfa5;
    background: #f0faf9;
}

/* Select/Dropdown Styles */
.form-select {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300bfa5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 45px;
}

.form-select:focus {
    outline: none;
    border-color: #00bfa5;
    background-color: #f0faf9;
}

.form-select option {
    padding: 10px;
}

button {
    width: 100%;
    padding: 18px;
    background: #00bfa5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

button:hover {
    background: #00897b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 191, 165, 0.3);
}

button:active {
    transform: translateY(0);
}

.status {
    margin-top: 25px;
    padding: 16px;
    border-radius: 10px;
    display: none;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
}

.status.success {
    background: #e0f7f4;
    color: #00897b;
    border: 2px solid #00bfa5;
}

.status.error {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #ef5350;
}

.clinic-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.clinic-info a {
    color: #00bfa5;
    text-decoration: none;
    font-weight: 600;
}

.clinic-info a:hover {
    text-decoration: underline;
}

/* Modal de confirmación */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.9) 0%, rgba(0, 137, 123, 0.95) 100%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.modal {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00bfa5 0%, #00897b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.modal-message {
    font-size: 15px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 300;
}

.modal-dates {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
}

.modal-dates-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.modal-dates-range {
    font-size: 16px;
    color: #00897b;
    font-weight: 600;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-btn {
    flex: 1;
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    letter-spacing: 0.3px;
}

.modal-btn-cancel {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.modal-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
    transform: none;
    box-shadow: none;
}

.modal-btn-confirm {
    background: #00bfa5;
    color: white;
}

.modal-btn-confirm:hover {
    background: #00897b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 191, 165, 0.3);
}

/* Login & Register Styles */
.login-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    font-size: 14px;
    color: #666;
    font-weight: 300;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #00bfa5;
    background: #f0faf9;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.error-message {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 2px solid #ef5350;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: #00bfa5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #00897b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 191, 165, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.login-footer a {
    color: #00bfa5;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Template Configuration Styles */
.btn-icon {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 4px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-config {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-config:hover {
    background: #00897b;
    transform: translateY(-1px);
}

.modal-large {
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 5px;
}

.templates-actions {
    margin-bottom: 20px;
}

.btn-primary {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #00897b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 191, 165, 0.3);
}

.btn-back {
    background: #f5f5f5;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #e0e0e0;
}

.back-button-container {
    margin-bottom: 20px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.template-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.template-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.template-card.configured {
    opacity: 0.6;
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.template-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    word-break: break-word;
    flex: 1;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 10px;
}

.badge-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-pending {
    background: #fff3e0;
    color: #f57c00;
}

.template-card-body {
    margin-bottom: 15px;
}

.template-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.template-preview-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.template-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.btn-edit, .btn-delete {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-edit {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-edit:hover {
    background: #bbdefb;
}

.btn-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background: #ffcdd2;
}

.text-muted {
    color: #999;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* Simple list styles */
.templates-simple-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.template-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.template-list-item:last-child {
    border-bottom: none;
}

.template-list-item:hover {
    background: #f9f9f9;
}

.template-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.template-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-small, .btn-delete-small {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    background: transparent;
}

.btn-edit-small {
    color: #1976d2;
}

.btn-delete-small {
    color: #c62828;
}

/* Template Configuration Modal */
.template-config-full {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.config-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.config-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.config-help {
    color: #666;
    font-size: 13px;
    margin: 0 0 15px 0;
}

.message-preview-compact {
    background: white;
    padding: 15px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    border-left: 3px solid #00bfa5;
}

.param-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.mapping-table thead {
    background: #f5f5f5;
}

.mapping-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.mapping-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

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

.param-cell code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d63384;
    font-weight: 600;
}

.mapping-table select {
    width: 100%;
}

@media (max-width: 600px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .navbar-logo {
        align-items: center;
    }
    
    .navbar-menu {
        width: 100%;
        justify-content: center;
    }
    
    .navbar-link {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .container {
        padding: 35px 25px;
    }
    
    .modal {
        padding: 35px 25px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .login-box {
        padding: 35px 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        max-width: 95%;
        margin: 20px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .mapping-table {
        font-size: 12px;
    }
    
    .mapping-table th,
    .mapping-table td {
        padding: 8px 10px;
    }
}

/* ==================== Logs Page Styles ==================== */

.container-wide h1 {
    font-size: 26px;
    margin-bottom: 18px;
}

.container-wide .status {
    margin-top: 10px;
}

/* Filters Container */
.filters-container {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}

.filter-group {
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Alinea los botones con los demás campos compensando la altura del label */
.filter-item.filter-actions {
    padding-top: 12px; /* label (16px) + gap (6px) */
}

.filter-item label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    min-height: 16px;
    display: flex;
    align-items: flex-end;
}

.filter-item input[type="date"],
.filter-item select,
.filter-item .btn-primary,
.filter-item .btn-secondary {
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.filter-item input[type="date"] {
    min-width: 140px;
}

.filter-item select {
    min-width: 120px;
    cursor: pointer;
}

.filter-item input[type="date"]:focus,
.filter-item select:focus {
    border-color: #00bfa5;
}



.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-item.filter-actions .btn-primary,
.filter-item.filter-actions .btn-secondary {
    height: 38px;
}

.filter-item .btn-primary,
.filter-item .btn-secondary {
    padding: 0 18px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-item .btn-primary {
    background: #00bfa5;
    color: white;
}

.filter-item .btn-primary:hover {
    background: #00897b;
}

.filter-item .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.filter-item .btn-secondary:hover {
    background: #e9ecef;
}

/* Logs Container */
.logs-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 3px;
}

.logs-table {
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

/* Log Table Header */
.log-table-header {
    display: grid;
    grid-template-columns: 160px 140px 2fr 60px 60px 60px 110px 130px;
    gap: 20px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Log Row */
.log-row {
    display: grid;
    grid-template-columns: 160px 140px 2fr 60px 60px 60px 110px 130px;
    gap: 20px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.log-row:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Log Columns */
.log-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.log-col-date {
    font-size: 13px;
}

.log-col-type {
    font-size: 13px;
}

.log-col-template {
    font-size: 13px;
    font-weight: 500;
}

.log-col-total,
.log-col-success,
.log-col-error {
    font-size: 13px;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.log-col-success {
    color: #28a745;
}

.log-col-error {
    color: #dc3545;
}

.log-col-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.log-col-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

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

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

/* View Log Button */
.btn-view-log {
    padding: 8px 16px;
    background: #00bfa5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-view-log:hover {
    background: #00897b;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pagination-info {
    font-size: 13px;
    color: #666;
}

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

.btn-page-nav {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.btn-page-nav:hover:not(:disabled) {
    background: #00bfa5;
    color: white;
    border-color: #00bfa5;
}

.btn-page-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-number {
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
}

.page-number:hover {
    background: #e9ecef;
}

.page-number.active {
    background: #00bfa5;
    color: white;
    border-color: #00bfa5;
}

/* Log Detail Modal */
.modal-xlarge {
    max-width: 98%;
    max-height: 98vh;
    margin: 10px;
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
}

.modal-xlarge .modal-body {
    padding: 20px;
    max-height: calc(98vh - 140px);
    overflow-y: auto;
}

.modal-xlarge .modal-header {
    padding: 15px 20px;
}

.modal-xlarge .modal-footer {
    padding: 12px 20px;
}

.log-detail-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.log-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    font-size: 13px;
}

.log-content-container {
    margin-top: 15px;
    flex: 1;
}

.log-content-container h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.log-content {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    max-height: calc(100vh - 400px);
    min-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.log-content::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

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

.log-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-item.filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .log-table-header,
    .log-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .log-col {
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 8px;
    }
    
    .log-col:last-child {
        border-bottom: none;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item input[type=\"date\"],
    .filter-item select {
        width: 100%;
    }
    
    .filter-item.filter-actions {
        flex-direction: row;
        width: 100%;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .log-detail-grid {
        grid-template-columns: 1fr;
    }
}

