/**
 * Palm Communities — Login Page Styles
 */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.pcd-login-body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050a18;
    color: #e6edf7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* ===== BACKGROUND ===== */
.pcd-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.pcd-login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.pcd-login-bg-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.55;
    animation: pcd-login-float 18s ease-in-out infinite;
}

.pcd-login-bg-glow--blue {
    background: var(--pcd-accent, #3b82f6);
    top: -200px;
    left: -200px;
}

.pcd-login-bg-glow--green {
    background: var(--pcd-success, #22c55e);
    bottom: -250px;
    right: -200px;
    animation-delay: -9s;
}

@keyframes pcd-login-float {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(40px, -40px); }
}

/* ===== SHELL ===== */
.pcd-login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.pcd-login-card {
    width: 100%;
    max-width: 460px;
    padding: 40px 40px 32px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.pcd-login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

/* ===== BRAND ===== */
.pcd-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.pcd-login-logo,
.pcd-login-logo-mark {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Make a dark logo pop on the dark background: soft accent glow halo
   behind the image, plus a slow breathing animation to draw the eye.
   The glow uses a radial-gradient pseudo-element rather than CSS filter
   so it works regardless of the logo's own colors / transparency. */
.pcd-login-logo {
    object-fit: contain;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            rgba(59,130,246,0.22) 0%,
            rgba(59,130,246,0.10) 45%,
            rgba(59,130,246,0) 70%);
    padding: 6px;
    box-sizing: border-box;
    width: 56px;
    height: 56px;
    animation: pcd-logo-pulse 3.2s ease-in-out infinite;
}

@keyframes pcd-logo-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(59,130,246,0.28),
            0 0 22px 2px rgba(59,130,246,0.18);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(59,130,246,0.04),
            0 0 36px 6px rgba(59,130,246,0.32);
    }
}

.pcd-login-logo-mark svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 14px rgba(59, 130, 246, 0.4));
}

.pcd-login-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pcd-login-brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
}

.pcd-login-brand-sub {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(230, 237, 247, 0.6);
    text-transform: uppercase;
    margin-top: 4px;
}

/* ===== HEADING ===== */
.pcd-login-heading { margin-bottom: 28px; }

.pcd-login-heading h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.pcd-login-heading p {
    margin: 0;
    font-size: 14px;
    color: rgba(230, 237, 247, 0.65);
}

/* ===== NOTICES ===== */
.pcd-login-notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}

.pcd-login-notice--error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.pcd-login-notice--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

/* ===== FORM ===== */
.pcd-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pcd-login-field { display: flex; flex-direction: column; gap: 8px; }

.pcd-login-field-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(230, 237, 247, 0.7);
    text-transform: uppercase;
}

.pcd-login-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pcd-login-field-wrap:focus-within {
    border-color: var(--pcd-accent, #3b82f6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.pcd-login-field-icon {
    width: 18px;
    height: 18px;
    margin-left: 14px;
    color: rgba(230, 237, 247, 0.45);
    flex-shrink: 0;
}

.pcd-login-field input[type="text"],
.pcd-login-field input[type="password"] {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 14px 14px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}

.pcd-login-field input::placeholder { color: rgba(230, 237, 247, 0.3); }

.pcd-login-toggle {
    background: transparent;
    border: 0;
    color: rgba(230, 237, 247, 0.45);
    cursor: pointer;
    padding: 8px 14px 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease;
}

.pcd-login-toggle:hover { color: rgba(230, 237, 247, 0.85); }
.pcd-login-toggle svg { width: 18px; height: 18px; }

/* ===== ROW (remember + forgot) ===== */
.pcd-login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.pcd-login-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(230, 237, 247, 0.75);
    cursor: pointer;
    user-select: none;
}

.pcd-login-check input { display: none; }

.pcd-login-check-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.pcd-login-check input:checked + .pcd-login-check-box {
    background: var(--pcd-accent, #3b82f6);
    border-color: var(--pcd-accent, #3b82f6);
}

.pcd-login-check input:checked + .pcd-login-check-box::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 5px; height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.pcd-login-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--pcd-accent, #3b82f6);
    text-decoration: none;
    transition: opacity 0.18s ease;
}

.pcd-login-link:hover { opacity: 0.78; }

/* ===== SUBMIT ===== */
.pcd-login-submit {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    width: 100%;
    background: linear-gradient(135deg, var(--pcd-accent, #3b82f6) 0%, #2563eb 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, calc(var(--pcd-glow, 60) / 200)),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.15s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pcd-login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        0 12px 32px rgba(59, 130, 246, calc(var(--pcd-glow, 60) / 150)),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pcd-login-submit:active { transform: translateY(0); }

.pcd-login-submit svg { width: 16px; height: 16px; transition: transform 0.18s ease; }
.pcd-login-submit:hover svg { transform: translateX(3px); }

/* ===== FOOTER ===== */
.pcd-login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(230, 237, 247, 0.4);
    letter-spacing: 0.02em;
}

.pcd-login-footer-dot { opacity: 0.5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    .pcd-login-card { padding: 32px 24px 24px; }
    .pcd-login-heading h1 { font-size: 22px; }
    .pcd-login-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
