/* ===== Fuentes ===== */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v40-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v40-latin-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v40-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v40-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

/* ===== Variables CSS ===== */
:root {
    --background: #f0f6fb;
    --foreground: #313d55;
    --card: #ffffff;
    --primary: #7d8bb2;
    --primary-hover: #6b7aa3;
    --muted: #bcc4d7;
    --muted-foreground: #767b93;
    --border: #e2e8f0;
    --placeholder: #afb2c0;
    --success: #22c55e;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Base ===== */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    line-height: 1.5;
}

/* ===== App Container ===== */
.app {
    min-height: 100vh;
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== Header ===== */
.header {
    padding: 12px 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-center {
    flex: 0 0 auto;
}

.logo {
    display: block;
    width: 180px;
    height: auto;
}

/* ===== Main ===== */
.main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px;
}

/* ===== Card ===== */
.card {
    background-color: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 32px 24px;
    width: 100%;
    max-width: 600px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--foreground);
    text-align: center;
    margin-bottom: 24px;
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 400;
    color: var(--foreground);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    color: var(--foreground);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--placeholder);
    font-weight: 400;
    text-transform: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(125, 139, 178, 0.2);
}

/* ===== Button ===== */
.btn-submit {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 24px;
    font-weight: 500;
    color: white;
    background-color: var(--primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 139, 178, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: spin 1s linear infinite;
}

.spinner-circle {
    opacity: 0.25;
}

.spinner-circle:first-child {
    stroke-dasharray: 60;
    stroke-dashoffset: 15;
    opacity: 0.75;
}

/* ===== Error Message ===== */
.error-message {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 6px;
    color: var(--error);
    text-align: center;
    font-size: 14px;
}

/* ===== Result ===== */
.result-container {
    display: none;
    margin-top: 24px;
    padding: 16px;
    background-color: var(--background);
    border: 1px solid var(--muted);
    border-radius: 6px;
    animation: fadeIn 0.3s ease-in-out;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    text-align: center;
    margin-bottom: 16px;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.result-row-last {
    border-bottom: none;
    padding-bottom: 0;
}

.result-label {
    font-weight: 500;
    color: var(--foreground);
}

.result-value {
    color: var(--foreground);
}

.result-status {
    color: var(--success);
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .main {
        padding: 24px 12px;
    }

    .card {
        padding: 24px 16px;
    }

    .card-title {
        font-size: 18px;
    }

    .form-input {
        font-size: 18px;
        padding: 10px 12px;
    }

    .btn-submit {
        font-size: 20px;
        padding: 10px 14px;
    }

    .logo {
        width: 150px;
    }
}