.a-view {
    width: 100%;
}

.a-view-header {
    margin-bottom: 22px;
    text-align: center;
}

.a-title {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 2.05rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.a-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    padding: 0 8px;
}

.a-form {
    width: 100%;
}

.a-field {
    margin-bottom: 16px;
}

.a-field:last-of-type {
    margin-bottom: 0;
}

.a-label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.a-input,
input.a-input,
.a-form input[type="email"],
.a-form input[type="text"],
.a-form input[type="password"],
.a-form input[type="number"],
.a-form input[type="tel"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.96rem;
    line-height: 1.35;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    appearance: none;
}

.a-input:focus,
.a-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: #f0f7ff;
}

.a-input::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.a-actions {
    margin-top: 20px;
}

.a-btn,
.a-form button[type="submit"],
button.a-btn {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 14px;
    padding: 0 20px;
    background: var(--a-btn-bg, var(--a-primary, #2563eb));
    color: var(--a-btn-color, #ffffff);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px var(--a-btn-shadow, rgba(37, 99, 235, 0.25));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.a-btn:hover,
.a-form button[type="submit"]:hover {
    background: var(--a-btn-bg-hover, var(--a-primary-hover, #1d4ed8));
}

.a-btn:active,
.a-form button[type="submit"]:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px var(--a-btn-shadow-hover, rgba(37, 99, 235, 0.2));
}

.a-links {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
}

.a-link,
.a-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.a-link:hover,
.a-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.a-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    border: 1px solid transparent;
}

.a-alert-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.a-alert-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.a-alert-warning {
    color: #854d0e;
    background: #fefce8;
    border-color: #fef08a;
}

.a-alert-info {
    color: #1e40af;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.a-muted {
    color: #64748b;
}

.a-center {
    text-align: center;
}

.a-hidden {
    display: none !important;
}

.a-help {
    margin-top: 7px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.4;
}

.a-password-wrapper,
.a-password-wrap {
    position: relative;
    width: 100%;
}

.a-input-with-toggle {
    padding-right: 42px;
}

.a-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #64748b;
    z-index: 3;
}

.a-password-toggle:hover {
    color: #1e293b;
}

.a-password-toggle .eye-open,
.a-password-toggle .eye-closed {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    pointer-events: none;
}

.a-code-input,
input.a-code-input {
    display: block;
    width: 100%;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 1.3rem;
    letter-spacing: 0.22em;
    padding-left: 16px;
    font-weight: 600;
}

.a-input-readonly {
    background-color: #f8fafc;
    cursor: not-allowed;
}

.a-reset-password-view {
    width: 100%;
}

.a-reset-form {
    width: 100%;
}

.a-reset-fields {
    width: 100%;
}

.a-reset-password-wrapper {
    position: relative;
}

.a-reset-password-toggle {
    right: 12px;
}

.a-password-rules-card {
    margin: 12px 0 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-align: center;
}

.a-password-rules-title {
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 700;
}

.a-password-rules-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px 16px;
    max-width: 360px;
    text-align: left;
}

.a-password-rule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
}

.a-password-rule-icon {
    width: 14px;
    min-width: 14px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
}

.a-password-rule.is-valid {
    color: #16a34a;
}

.a-password-rule.is-invalid {
    color: #dc2626;
}

/* ============================================================================
   LOGO Y BRANDING - DINÁMICO Y RESPONSIVE
   ============================================================================ */

.a-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

/* Logo con imagen dinámica - soporta cualquier formato (SVG, PNG, JPG, etc.) */
.a-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
}

/* Fallback emoji cuando no hay imagen */
.a-logo-emoji {
    width: 80px;
    height: 80px;
    font-size: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 20px;
    flex-shrink: 0;
    color: white;
}

.a-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.a-brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #1e293b;
}

.a-brand-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
}

/* ============================================================================
   RESPONSIVE - LOGO Y BRANDING
   ============================================================================ */

@media (max-width: 768px) {
    .a-brand {
        gap: 16px;
    }

    .a-logo,
    .a-logo-emoji {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .a-logo-emoji {
        font-size: 44px;
    }

    .a-brand-title {
        font-size: 1.75rem;
    }

    .a-brand-subtitle {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .a-brand {
        gap: 14px;
    }

    .a-logo,
    .a-logo-emoji {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .a-logo-emoji {
        font-size: 38px;
    }

    .a-brand-title {
        font-size: 1.5rem;
    }

    .a-brand-subtitle {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .a-brand {
        gap: 12px;
    }

    .a-logo,
    .a-logo-emoji {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .a-logo-emoji {
        font-size: 32px;
    }

    .a-brand-title {
        font-size: 1.3rem;
    }

    .a-brand-subtitle {
        font-size: 0.7rem;
    }
}

/* ============================================================================
   MEDIA QUERIES EXISTENTES (MANTENIDOS)
   ============================================================================ */

@media (min-width: 768px) {
    .a-view.a-surface {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        padding: 32px 40px;
        text-align: center;
    }

    .a-view .a-field {
        text-align: center;
    }

    .a-view .a-label {
        text-align: center;
    }

    .a-view .a-input[type="email"],
    .a-view .a-input[type="text"][name="email"],
    .a-view .a-input[type="password"],
    .a-view .a-input[name="password"],
    .a-view .a-input[name="password_confirmation"] {
        max-width: 75%;
        margin-left: auto;
        margin-right: auto;
    }

    .a-view .a-btn,
    .a-view .a-form button[type="submit"] {
        max-width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .a-view-header {
        margin-bottom: 18px;
    }

    .a-title {
        font-size: 1.6rem;
    }

    .a-subtitle {
        font-size: 0.9rem;
        padding: 0 4px;
    }

    .a-field {
        margin-bottom: 14px;
    }

    .a-label {
        font-size: 0.84rem;
        margin-bottom: 4px;
    }

    .a-input,
    input.a-input,
    .a-form input {
        min-height: 44px;
        padding: 9px 12px;
        font-size: 0.93rem;
        border-radius: 12px;
    }

    .a-input-with-toggle {
        padding-right: 40px;
    }

    .a-actions {
        margin-top: 18px;
    }

    .a-btn,
    .a-form button[type="submit"] {
        min-height: 46px;
        border-radius: 12px;
        font-size: 0.93rem;
    }

    .a-links {
        margin-top: 18px;
        padding-top: 14px;
        gap: 8px 12px;
        flex-direction: column;
    }

    .a-link,
    .a-links a {
        font-size: 0.84rem;
    }

    .a-alert {
        padding: 9px 12px;
        font-size: 0.84rem;
        border-radius: 10px;
    }

    .a-password-toggle {
        right: 10px;
        width: 22px;
        height: 22px;
    }

    .a-code-input,
    input.a-code-input {
        max-width: 180px;
        font-size: 1.18rem;
        letter-spacing: 0.18em;
        padding-left: 12px;
    }

    .a-help {
        font-size: 0.78rem;
    }

    .a-password-rules-card {
        padding: 12px 12px;
        border-radius: 12px;
    }

    .a-password-rules-title {
        font-size: 0.84rem;
        margin-bottom: 8px;
    }

    .a-password-rules-list {
        grid-template-columns: 1fr 1fr;
        gap: 7px 10px;
        max-width: 290px;
    }

    .a-password-rule {
        font-size: 0.8rem;
        white-space: normal;
    }

    .a-password-rule-icon {
        width: 13px;
        min-width: 13px;
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .a-password-rules-list {
        grid-template-columns: 1fr;
        max-width: 220px;
        gap: 6px 8px;
    }

    .a-password-rule {
        font-size: 0.78rem;
    }

    .a-code-input,
    input.a-code-input {
        max-width: 160px;
    }
}
/* ==========================================================================
   EY_AUTH_RESPONSIVE_ALL_VIEWS_V1_FORMS
   Formularios, tarjetas, estados y controles touch.
   ========================================================================== */

.a-view {
    width: 100%;
    margin: 0 auto;
}

.a-surface {
    width: 100%;
    padding: clamp(22px, 3vw, 30px);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 16px 42px rgba(15, 23, 42, 0.08),
        0 3px 10px rgba(15, 23, 42, 0.04);
}

.a-view-header {
    margin-bottom: 18px;
    text-align: center;
}

.a-title {
    margin-bottom: 6px;
    font-size: clamp(1.55rem, 5vw, 1.95rem);
    line-height: 1.14;
    color: #17233a;
}

.a-subtitle {
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    color: #64748b;
    font-size: 0.96rem;
    line-height: 1.42;
}

.a-form {
    width: 100%;
}

.a-field {
    width: 100%;
}

.a-input,
.a-select,
.a-textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border-color: #cbd5e1;
    background: #ffffff;
    font-size: 16px;
}

.a-input:focus,
.a-select:focus,
.a-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
    outline: none;
}

.a-actions {
    width: 100%;
}

.a-btn,
button.a-btn,
a.a-btn {
    min-height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.a-links {
    width: 100%;
    text-align: center;
}

.a-link {
    line-height: 1.4;
}

.a-alert {
    border-radius: 12px;
}

.a-code-input {
    min-height: 52px;
    text-align: center;
    letter-spacing: 0.12em;
}

@media (max-width: 640px) {
    .a-surface {
        padding: 20px 17px;
        border-radius: 17px;
    }

    .a-view-header {
        margin-bottom: 16px;
    }

    .a-title {
        font-size: clamp(1.45rem, 7vw, 1.72rem);
    }

    .a-subtitle {
        font-size: 0.9rem;
    }

    .a-form {
        gap: 14px;
    }

    .a-links {
        gap: 7px;
    }
}

@media (max-height: 740px) {
    .a-surface {
        padding-top: 17px;
        padding-bottom: 17px;
    }

    .a-view-header {
        margin-bottom: 13px;
    }

    .a-title {
        margin-bottom: 4px;
    }
}
