:root {
    --primary: #f8a900;
    /* Yellow */
    --secondary: #043668;
    /* Dark Blue */
    --bg-color: #f4f7f6;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --error: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --shadow: 0 10px 30px rgba(4, 54, 104, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.background-decor {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 150vw;
    height: 150vh;
    background: radial-gradient(circle, rgba(4, 54, 104, 0.05) 0%, rgba(248, 169, 0, 0.02) 100%);
    z-index: -1;
    border-radius: 50%;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary);
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: var(--secondary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}

.input-group input {
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(248, 169, 0, 0.2);
}

.error-message {
    color: var(--error);
    font-size: 12px;
    height: 14px;
}

button {
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

button:hover {
    background-color: #03274d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 54, 104, 0.2);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

.result-container {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.not-found-container {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    background-color: var(--secondary);
    color: var(--white);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header {
    background-color: var(--secondary);
    color: var(--white);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.photo-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--white);
    overflow: hidden;
    background-color: #e1e8ed;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-title h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.badge {
    background-color: var(--primary);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Specific Badge Colors based on status (handled via JS, default is primary) */
.badge.vigente {
    background-color: var(--success);
    color: white;
}

.badge.por-vencer {
    background-color: var(--warning);
    color: white;
}

.badge.sin-carne {
    background-color: var(--error);
    color: white;
}

.card-body {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.info-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-group .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-group .value {
    font-size: 16px;
    color: var(--secondary);
    font-weight: 600;
    word-break: break-word;
}

@media (min-width: 480px) {
    .profile-header {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    .profile-title {
        align-items: flex-start;
        padding-top: 10px;
    }
}