*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-bg: #0b1020;
    --color-primary: #8b5cf6;
    --color-primary-dark: #7c3aed;
    --color-surface: rgba(17, 24, 39, 0.9);
    --color-text: #e5e7eb;
    --color-muted: #9aa4b2;
    --color-border: rgba(148, 163, 184, 0.35);
    --color-glow: rgba(139, 92, 246, 0.35);
}

body {
    top: 0;
    left: 0;
    margin: 0;
    font-size: 14px;
    background: radial-gradient(1200px 500px at 10% -10%, #1b2450 0%, transparent 60%),
        radial-gradient(900px 700px at 90% 0%, #2a1b5a 0%, transparent 55%),
        linear-gradient(180deg, var(--color-bg) 0%, #080b18 100%);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

.img-logo {
    width: 30%;
    max-width: 220px;
}

button {
    height: 42px;
    font-size: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0ea5e9 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

button:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #22d3ee 100%);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.35);
}

button:active {
    transform: translateY(1px);
}

.logo {
    width: 100%;
    text-align: center;
    margin-top: 70px;
    margin-bottom: 60px;
    padding: 0 16px;
}

.boton1 {
    height: 42px;
    width: min(420px, 86%);
    margin-left: auto;
    margin-right: auto;
    display: block;
    font-size: 16px;
    cursor: pointer;
}

.boton1-link {
    text-decoration: none;
}

.tituloPagina {
    font-size: 24px;
    width: min(640px, 90%);
    margin: 0 auto 12px;
    line-height: 1.3;
    color: #f8fafc;
}

.menu {
    background: red;
    text-align: center;
    padding: 10;
    font-size: 20px;
}

.asterisco {
    color: #f97316;
}

.contenedor_principal {
    width: min(980px, 92%);
    margin: 32px auto 48px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.88) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-radius: 18px;
    padding: 28px;
    color: var(--color-text);
    float: none;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
}

.contenedor_input {
    margin-bottom: 12px;
    float: none;
    width: 100%;
}

input[type=text], input[type=image], input[type=number], select {
    display: block;
    width: 100%;
    height: 40px;
    outline: none;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857;
    color: #e5e7eb;
    background-color: rgba(15, 23, 42, 0.85);
    background-image: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
    -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

input[type=text]::placeholder,
input[type=number]::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

input[type=text]:focus,
input[type=number]:focus,
select:focus {
    border-color: rgba(139, 92, 246, 0.85);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), 0 0 22px rgba(99, 102, 241, 0.35);
}

.nombre, .apellido {
    grid-column: span 4;
}

.correo {
    grid-column: span 4;
}

.cuenta {
    grid-column: span 8;
}

#correo {
    cursor: no-drop;
}

.direccion {
    grid-column: 1 / -1;
}

.puesto {
    grid-column: span 6;
}

.empresa {
    grid-column: span 6;
}

.codigoPostal {
    grid-column: span 4;
}

.ciudad, .estado {
    grid-column: span 4;
}

.pais {
    grid-column: span 3;
}

.notas {
    grid-column: 1 / -1;
}


.web {
    grid-column: span 4;
}

.final {
    margin-right: 0;
}

.imagen, .imagen2 {
    grid-column: span 6;
    margin: 0;
}

.qr {
    grid-column: span 6;
}

.input-imagen {
    border: solid 1px #767676;
    border-radius: 3px;
    padding: 1%;
}

.previsualizacionImagen {
    width: 98%;
    height: 98%;
    object-fit: cover;
    margin-left: 1%;
    margin-top: 1%;
}

.contenedor_izq {
    width: 100%;
    float: none;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 12px;
}

.contenedor_der {
    width: 100%;
    float: none;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 12px;
}

.contenedor_der small,
.contenedor_der hr {
    grid-column: 1 / -1;
}

.contenedor_der small {
    color: var(--color-muted);
    font-weight: 600;
}

.contenedor_der hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    margin: 8px 0 12px;
}

input[type="file"] {
    display: none;
}
.custom-file-upload {
    cursor: pointer;
    height: 400px;
    display: block;
    width: 99%;
    outline: none;
    font-size: 14px;
    background-color: rgba(15, 23, 42, 0.75);
    background-image: none;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
    -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

 .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    max-width: min(520px, 90%);
    font-size: 15px;
    font-weight: 600;
    border-left: 6px solid #38bdf8;
}

.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast--success {
    background: #0f766e;
    border-left-color: #22c55e;
}

.toast--error {
    background: #b42318;
    border-left-color: #f97316;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 20, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.loading-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #f8fafc;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 12px;
    color: #ffffff;
    font-weight: 600;
}

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

.notice {
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    width: min(520px, 90%);
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.notice--error {
    background: rgba(127, 29, 29, 0.6);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fee2e2;
}

@media (max-width: 600px) {
    .tituloPagina {
        font-size: 22px;
        width: 80%;
        margin-left: 10%;
    }
    .img-logo {
        width: 50%;
    }
    .boton1 {
        width: 86%;
        margin-left: auto;
        margin-right: auto;
    }
    .contenedor_input {
        width: 100%;
    }
    .contenedor_izq,
    .contenedor_der {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }
    .nombre, .apellido, .correo, .cuenta, .puesto, .empresa, .direccion, .codigoPostal, .ciudad, .estado, .pais, .notas, .web, .imagen, .imagen2, .qr {
        grid-column: 1 / -1;
    }
    .imagen, .imagen2 {
        margin-top: 10px;
    }
    .contenedor_principal {
        width: 92%;
        margin-left: auto;
        margin-right: auto;
        padding: 20px;
    }
    input[type=text] {
        height: 42px;
    }
}

@media (max-width: 900px) {
    .nombre, .apellido, .correo, .cuenta, .puesto, .empresa, .codigoPostal, .ciudad, .estado, .pais, .notas, .web, .imagen, .imagen2, .qr {
        width: 100%;
    }
}