/* =========================================
   PCW_LOGIN.css — Login page styles
   ========================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f4f8;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Wrapper ── */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ── Card ── */
.login-card {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 36px 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

/* ── Logo ── */
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.login-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.login-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.login-logo-text span:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.login-logo-text span:last-child {
    font-size: 18px;
    font-weight: 700;
    color: #16a34a;
}

/* ── Heading ── */
.login-card h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 28px;
}

/* ── Form fields ── */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* ── Password toggle ── */
.login-password-wrap {
    position: relative;
}

.login-password-wrap input {
    padding-right: 44px;
}

.login-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.login-eye:hover {
    color: #64748b;
    background: #f1f5f9;
}

.login-eye svg {
    width: 20px;
    height: 20px;
}

/* ── Error message ── */
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.login-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

/* ── Submit button ── */
.login-btn {
    width: 100%;
    height: 46px;
    background: #16a34a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.login-btn:hover {
    background: #15803d;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Spinner ── */
.login-spinner {
    width: 20px;
    height: 20px;
    animation: login-spin 0.8s linear infinite;
}

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

/* ── Footer ── */
.login-footer {
    font-size: 12px;
    color: #94a3b8;
}

.login-alt-link {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.login-alt-link a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
}

.login-alt-link a:hover {
    text-decoration: underline;
}

/* ── 2FA code input ── */
#twofa-code {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 8px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
    outline: none;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#twofa-code:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 16px;
    }
    .login-card {
        padding: 32px 24px 28px;
    }
}
