/* ═══════════════════════════════════════════════
   Private Site Gate — Login Page Styles
   ═══════════════════════════════════════════════ */

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

.psg-body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--psg-bg, #0f172a);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ── Animated Background ── */
.psg-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.psg-bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.psg-glow-1 {
    width: 500px;
    height: 500px;
    background: var(--psg-accent, #3b82f6);
    top: -15%;
    right: -10%;
    animation: psg-float 12s ease-in-out infinite;
}

.psg-glow-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -10%;
    left: -10%;
    animation: psg-float 15s ease-in-out infinite reverse;
}

@keyframes psg-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Container ── */
.psg-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: psg-fadeUp 0.6s ease-out;
}

@keyframes psg-fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Card ── */
.psg-card {
    background: var(--psg-card-bg, rgba(255,255,255,0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 44px 36px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.1),
        0 24px 48px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Header ── */
.psg-header {
    text-align: center;
    margin-bottom: 36px;
}

.psg-logo {
    max-height: 64px;
    max-width: 200px;
    width: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.psg-site-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--psg-accent, #3b82f6), #8b5cf6);
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.psg-title {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.psg-subtitle {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ── Form ── */
.psg-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.psg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.psg-label {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.psg-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.psg-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s;
}

.psg-input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.psg-input::placeholder {
    color: #475569;
}

.psg-input:focus {
    border-color: var(--psg-accent, #3b82f6);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.psg-input:focus ~ .psg-input-icon,
.psg-input:focus + .psg-input-icon,
.psg-input-wrap:focus-within .psg-input-icon {
    color: var(--psg-accent, #3b82f6);
}

/* ── Toggle Password ── */
.psg-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #64748b;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.psg-toggle-pass:hover {
    color: #94a3b8;
}

.psg-toggle-pass svg {
    width: 18px;
    height: 18px;
}

/* ── Options Row ── */
.psg-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.psg-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #94a3b8;
    user-select: none;
}

.psg-remember input[type="checkbox"] {
    display: none;
}

.psg-check-mark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.psg-remember input:checked + .psg-check-mark {
    background: var(--psg-accent, #3b82f6);
    border-color: var(--psg-accent, #3b82f6);
}

.psg-remember input:checked + .psg-check-mark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.psg-forgot {
    color: var(--psg-accent, #3b82f6);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.psg-forgot:hover {
    opacity: 0.8;
}

/* ── Error Message ── */
.psg-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #fca5a5;
    text-align: center;
    animation: psg-fadeIn 0.3s ease;
}

@keyframes psg-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Submit Button ── */
.psg-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--psg-accent, #3b82f6), #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    margin-top: 4px;
}

.psg-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

.psg-submit:active:not(:disabled) {
    transform: translateY(0);
}

.psg-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.psg-submit.psg-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.psg-submit-loader {
    display: inline-flex;
    align-items: center;
}

/* ── Shake Animation ── */
@keyframes psg-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.psg-shake {
    animation: psg-shake 0.4s ease-in-out;
}

/* ── Footer ── */
.psg-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    color: #475569;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .psg-card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .psg-title {
        font-size: 20px;
    }

    .psg-glow-1,
    .psg-glow-2 {
        width: 300px;
        height: 300px;
    }

    .psg-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
