* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(180deg, rgb(7, 58, 153) 0%, rgba(79, 98, 103, 1) 35%, rgb(3, 4, 66) 100%);
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    color: #fff;
}

.C-Cformulario-de-contacto {
    display: flex;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
    width: min(100%, 980px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.C-I {
    flex: 1;
    padding: 30px;
    background:
        radial-gradient(circle at top left, rgba(0, 102, 255, 0.24), transparent 42%),
        linear-gradient(180deg, #111 0%, #171717 100%);
    display: grid;
    gap: 14px;
}

.C-I p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.intro-contacto {
    color: rgba(255, 255, 255, 0.78);
    max-width: 34ch;
    margin-bottom: 8px;
}

.lista-contacto {
    display: grid;
    gap: 14px;
}

.item-contacto {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

.item-contacto strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.98rem;
    color: #ffffff;
}

.item-contacto p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.icono-contacto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.95), rgba(68, 198, 255, 0.65));
    box-shadow: 0 10px 22px rgba(0, 102, 255, 0.24);
    color: #fff;
    font-size: 1.1rem;
}

.C-F {
    flex: 1;
    padding: 30px;
    background-color: #222;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.encabezado-formulario {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.C-F h2,
.encabezado-formulario h2 {
    margin-bottom: 0;
}

.link-registros,
.boton-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.link-registros:hover,
.boton-secundario:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

.boton-eliminar {
    padding: 9px 12px;
    border: 1px solid rgba(255, 120, 120, 0.45);
    border-radius: 10px;
    background: rgba(220, 82, 82, 0.14);
    color: #ffd8d8;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.boton-eliminar:hover {
    background: rgba(220, 82, 82, 0.25);
    border-color: rgba(255, 160, 160, 0.6);
}

.boton-restaurar {
    padding: 9px 12px;
    border: 1px solid rgba(79, 186, 122, 0.45);
    border-radius: 10px;
    background: rgba(51, 176, 112, 0.14);
    color: #d6ffe9;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.boton-restaurar:hover {
    background: rgba(51, 176, 112, 0.24);
    border-color: rgba(121, 227, 162, 0.55);
}

.C-F form {
    display: flex;
    flex-direction: column;
}

.C-F form input,
.C-F form textarea {
    margin-bottom: 15px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
}

.C-F form button {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #0066ff;
    color: #fff;
    cursor: pointer;
}

.C-F form button:hover {
    background-color: #0052cc;
}

.C-F form button:disabled,
.boton-google:disabled,
.boton-secundario:disabled {
    opacity: 0.7;
    cursor: wait;
}

.input-container {
    position: relative;
    margin-bottom: 25px;
}

.input-container input,
.input-container textarea {
    width: 100%;
    padding: 14px 10px;
    border-radius: 6px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.input-container textarea {
    min-height: 120px;
    resize: vertical;
}

.input-container textarea:invalid {
    border: 1px solid #ff7b7b;
}

.telefono-container {
    margin-bottom: 25px;
}

.telefono-container .telefono-label {
    position: static;
    display: block;
    margin-bottom: 10px;
    color: #ddd;
    font-size: 0.95rem;
}

.telefono-input-group {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
}

.telefono-input-group select,
.telefono-input-group input {
    width: 100%;
    padding: 14px 12px;
    border: none;
    border-radius: 6px;
    background: #333;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.telefono-input-group select {
    cursor: pointer;
    appearance: none;
}

.mensaje-error {
    display: block;
    margin-top: 8px;
    color: #ffb3b3;
    font-size: 0.85rem;
    line-height: 1.4;
}

.mensaje-estado {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.mensaje-estado[data-tipo="success"] {
    background: rgba(51, 176, 112, 0.18);
    border: 1px solid rgba(51, 176, 112, 0.35);
    color: #d6ffe9;
}

.mensaje-estado[data-tipo="error"] {
    background: rgba(220, 82, 82, 0.18);
    border: 1px solid rgba(220, 82, 82, 0.35);
    color: #ffd8d8;
}

.mensaje-estado[data-tipo="info"] {
    background: rgba(0, 102, 255, 0.16);
    border: 1px solid rgba(85, 150, 255, 0.35);
    color: #dce8ff;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.input-container label {
    position: absolute;
    left: 10px;
    top: 14px;
    color: #aaa;
    font-size: 16px;
    pointer-events: none;
    transition: 0.3s ease;
}

.input-container input:focus + label,
.input-container input:valid + label,
.input-container textarea:focus + label,
.input-container textarea:not(:placeholder-shown) + label,
.input-container.active label {
    top: -8px;
    left: 8px;
    font-size: 12px;
    color: #ffffff;
    background: #222;
    padding: 0 5px;
    border-radius: 3px;
}

.pagina-registros {
    align-items: flex-start;
}

.contenedor-registros {
    width: min(1100px, 100%);
    margin: 0 auto;
}

.cabecera-registros {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 8px;
    color: #b8d2ff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.cabecera-registros h1 {
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.descripcion-registros {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.acciones-registros {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-registros {
    background: rgba(0, 0, 0, 0.55);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.estado-vacio {
    padding: 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
    color: rgba(255, 255, 255, 0.86);
}

.login-panel {
    max-width: 420px;
    padding: 28px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.login-panel h2 {
    margin-bottom: 10px;
}

.login-panel p {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
}

.boton-google {
    margin-top: 18px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    color: #1f1f1f;
    font-weight: 700;
    cursor: pointer;
}

.tabla-wrapper {
    overflow-x: auto;
}

.tabla-registros {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.tabla-registros th,
.tabla-registros td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.tabla-registros th {
    color: #b8d2ff;
    font-weight: 700;
    font-size: 0.92rem;
}

.tabla-registros td {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.tarjetas-registros {
    display: none;
}

.tarjeta-registro {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.tarjeta-registro h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.tarjeta-registro p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.tarjeta-registro .boton-eliminar {
    margin-top: 8px;
}

.tarjeta-registro .boton-restaurar {
    margin-top: 8px;
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 16px;
    }

    .C-Cformulario-de-contacto {
        flex-direction: column;
        width: 100%;
    }

    .C-F {
        order: 1;
    }

    .C-I {
        order: 2;
    }

    .C-I,
    .C-F {
        padding: 24px 20px;
    }

    .C-F {
        justify-content: flex-start;
    }

    .C-I h2,
    .C-F h2 {
        font-size: 1.5rem;
    }

    .encabezado-formulario,
    .cabecera-registros {
        flex-direction: column;
        align-items: stretch;
    }

    .acciones-registros {
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .C-I,
    .C-F {
        padding: 20px 16px;
    }

    .C-I p,
    .check {
        font-size: 0.95rem;
    }

    .item-contacto {
        grid-template-columns: 44px 1fr;
        padding: 14px;
    }

    .icono-contacto {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .input-container input,
    .input-container textarea,
    .C-F form button {
        font-size: 16px;
    }

    .telefono-input-group {
        grid-template-columns: 1fr;
    }

    .C-F form button,
    .link-registros,
    .boton-secundario,
    .boton-eliminar,
    .boton-restaurar {
        width: 100%;
    }

    .panel-registros {
        padding: 16px;
    }

    .tabla-wrapper {
        display: none;
    }

    .tarjetas-registros {
        display: grid;
        gap: 14px;
    }
}
