* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-placeholder {
    display: inline-block;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-container h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1e40af;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #64748b;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #475569;
}

.messages {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.data-header h3 {
    color: #333;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
    font-weight: 500;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e1e5e9;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:nth-child(even) {
    background: #fbfbfb;
}

.data-table tbody tr:nth-child(even):hover {
    background: #f8f9fa;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.stats {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.search-filters {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.search-filters h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.filter-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group input:focus {
    outline: none;
    border-color: #1e40af;
}

.filter-group .btn {
    margin-right: 10px;
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.filter-note {
    margin-top: 10px;
}

.filter-note small {
    color: #666;
    font-style: italic;
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e5e9;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #1e40af;
}

.tab-button.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .section {
        padding: 20px;
    }

    .data-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .filter-group .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* ========================================
   CÓDIGOS SALVOCONDUCTO - ACTUAL VS ANTERIOR
   ======================================== */

/* Código Actual - Destacado en verde oscuro */
.codigo-actual {
    color: #2e7d32;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Código Anterior - Gris en negrita */
.codigo-anterior {
    color: #757575;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Responsive: En móvil, reducir tamaño de fuente de códigos */
@media (max-width: 768px) {
    .codigo-actual,
    .codigo-anterior {
        font-size: 12px;
    }
}
