/* WonderAgent 認証画面（ProSales auth レイアウト準拠） */

.wa-auth-body,
.wa-auth-body *,
.wa-auth-body *::before,
.wa-auth-body *::after,
.wa-login-body,
.wa-login-body *,
.wa-login-body *::before,
.wa-login-body *::after {
    box-sizing: border-box;
}

.wa-auth-body,
.wa-login-body {
    min-height: 100vh;
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #111827;
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
}

.wa-auth-bg-pattern,
.wa-login-body::before {
    position: fixed;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.wa-login-body::before {
    content: "";
}

.wa-auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.wa-auth-stack {
    width: 100%;
    max-width: 28rem;
}

.wa-auth-flash {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wa-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    animation: waAuthSlideIn 0.3s ease-out;
}

.wa-auth-alert-danger {
    background: #fef2f2;
    border-left: 4px solid #f87171;
    color: #b91c1c;
}

.wa-auth-alert-success {
    background: #f0fdf4;
    border-left: 4px solid #4ade80;
    color: #15803d;
}

.wa-auth-alert-info,
.wa-auth-alert-warning {
    background: #eff6ff;
    border-left: 4px solid #60a5fa;
    color: #1d4ed8;
}

.wa-auth-card,
.wa-login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

.wa-login-card.card {
    border: 1px solid #f3f4f6;
}

.wa-login-card .card-body {
    padding: 0;
}

.wa-auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.wa-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    background: linear-gradient(to bottom right, #2563eb, #7c3aed);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.35);
    color: #fff;
    font-size: 1.5rem;
}

.wa-auth-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.wa-auth-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #4b5563;
}

.wa-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.wa-auth-field {
    width: 100%;
    min-width: 0;
}

.wa-auth-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.wa-auth-field label i {
    color: #9ca3af;
    width: 1rem;
    text-align: center;
}

.wa-auth-input-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.wa-auth-input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wa-auth-input::placeholder {
    color: #9ca3af;
}

.wa-auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wa-auth-input-password {
    padding-right: 2.75rem;
}

.wa-auth-toggle-pw {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.wa-auth-toggle-pw:hover {
    color: #4b5563;
}

.wa-auth-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(to right, #2563eb, #4f46e5);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.wa-auth-submit:hover {
    background: linear-gradient(to right, #1d4ed8, #4338ca);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.wa-auth-submit:active {
    transform: translateY(1px);
}

.wa-auth-submit-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.wa-auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

@keyframes waAuthSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .wa-auth-card,
    .wa-login-card {
        padding: 1.5rem;
    }
}
