:root {
    --color-background: #f5f7fa;
    --color-foreground: #2d3748;
    --color-card: #ffffff;
    --color-card-foreground: #2d3748;
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-foreground: #ffffff;
    --color-warning: #f59e0b;
    --color-warning-hover: #d97706;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-border: #e2e8f0;
    --color-input: #e2e8f0;
    --color-muted: #f1f5f9;
    --color-muted-foreground: #64748b;
    --color-header: #4f46e5;
    --radius: 0.75rem;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M15 25c2.5 0 5-2.5 5-5s-2.5-5-5-5-5 2.5-5 5 2.5 5 5 5zm30 0c2.5 0 5-2.5 5-5s-2.5-5-5-5-5 2.5-5 5 2.5 5 5 5zM30 15c2.5 0 5-2.5 5-5s-2.5-5-5-5-5 2.5-5 5 2.5 5 5 5zm-7.5 25c2.5 0 5-2.5 5-5s-2.5-5-5-5-5 2.5-5 5 2.5 5 5 5zm15 0c2.5 0 5-2.5 5-5s-2.5-5-5-5-5 2.5-5 5 2.5 5 5 5z' fill='%2310b981' fill-opacity='0.05'/%3E%3C/svg%3E");
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 30rem;
    padding: 1.5rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.card {
    background-color: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
    background-color: var(--color-header);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.paw-icon {
    width: 36px;
    height: 36px;
    color: white;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-description {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-footer {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--color-border);
}

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

label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-foreground);
}

input,
select {
    padding: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-input);
    background-color: var(--color-background);
    font-size: 0.875rem;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.input-help {
    font-size: 0.75rem;
    color: var(--color-muted-foreground);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.75rem;
    height: 0.75rem;
    border-right: 2px solid var(--color-muted-foreground);
    border-bottom: 2px solid var(--color-muted-foreground);
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    width: 100%;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--color-warning);
    color: var(--color-primary-foreground);
}

.btn-warning:hover {
    background-color: var(--color-warning-hover);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--color-success);
    color: var(--color-primary-foreground);
}

.btn-success:hover {
    background-color: var(--color-success-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-foreground);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    background-color: var(--color-muted);
    transform: translateY(-2px);
}

.icon {
    width: 1rem;
    height: 1rem;
}

.tiempo-info {
    background-color: var(--color-muted);
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    border-left: 4px solid var(--color-primary);
}

.tiempo-info p {
    margin-bottom: 0.5rem;
}

.tiempo-info p:last-child {
    margin-bottom: 0;
}

.hidden {
    display: none !important;
}

/* Modal de envío */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 500px;
    z-index: 101;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.cerrar-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-muted-foreground);
    transition: color 0.2s;
}

.cerrar-modal:hover {
    color: var(--color-foreground);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.mensaje-preview {
    margin-bottom: 1.5rem;
}

.mensaje-preview h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.mensaje-preview-text {
    background-color: var(--color-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    white-space: pre-line;
    font-size: 0.875rem;
}

.envio-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-success);
    animation: spin 1s ease-in-out infinite;
}

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

.modal-footer .btn {
    width: auto;
}

/* Radio buttons para método de envío */
.metodo-envio {
    margin: 1.5rem 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.radio-label:hover {
    background-color: var(--color-muted);
}

.radio-label input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--color-primary);
}

.radio-text {
    font-size: 0.875rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .card-header {
        padding: 1.5rem 1rem;
    }

    .card-content,
    .card-footer {
        padding: 1.25rem 1rem;
    }
}
