:root {
    font-family: Montserrat, system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color-scheme: light;
    color: #333;
    background-color: #f4f6f9;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    --primary: #1E4576;
    --primary-dark: #163358;
    --secondary: #00AEEF;
    --accent: #FFD700;
    --success: #28a745;
    --danger: #dc3545;
    --border-radius: 6px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1)
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(#1e4576e6, #163358f2), url(/imagenes/fondo.jpg) no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem
}

#root {
    width: 100%
}

.verification-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto
}

.verification-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeIn .5s ease-out
}

.card-header {
    background-color: var(--primary);
    color: #fff;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--secondary)
}

.card-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px
}

.card-body {
    padding: 2rem
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.form-group label {
    font-weight: 600;
    font-size: .8rem;
    color: #666;
    text-transform: uppercase
}

.form-control {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    font-family: inherit;
    font-size: .95rem;
    color: #333
}

.form-control[readonly] {
    background-color: #f1f3f5;
    cursor: default
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 5px solid var(--secondary)
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border-left: 5px solid var(--danger)
}

.scanner-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px dashed #ccc;
    animation: fadeIn .3s ease-out;
    overflow: hidden
}

.custom-scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
    aspect-ratio: 1 / 1
}

#reader {
    width: 100% !important;
    height: 100% !important
}

#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 215, 0, .3);
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center
}

.scanner-line {
    width: 90%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    position: absolute;
    animation: scanMove 2s linear infinite
}

@keyframes scanMove {
    0% {
        top: 10%
    }

    50% {
        top: 90%
    }

    to {
        top: 10%
    }
}

.pdf-section {
    margin-top: 3rem;
    border-top: 2px solid #eee;
    padding-top: 2rem;
    margin-left: -2rem;
    margin-right: -2rem
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 2rem
}

.pdf-title-group {
    display: flex;
    flex-direction: column;
    gap: .25rem
}

.pdf-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--primary);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: .25rem .75rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #c8e6c9;
    width: fit-content
}

.pdf-preview-container {
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-family: inherit;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s;
    border: none
}

.btn-success {
    background-color: var(--success);
    color: #fff
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px)
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(30, 69, 118, .1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 3rem auto
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media (max-width: 600px) {
    .card-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center
    }
}