/* ==========================================================
   pix4ks — Login (css/login.css)
   Ported from MindeskWeb login.css: light glassmorphism card,
   animated background shapes, social sign-in buttons.
   Self-contained (own reset + tokens) and CSP-safe (no external
   assets; icons are inline SVG, logo is the pix4ks "P" mark).
   ========================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --bg-soft: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);

    --border-color: #e2e8f0;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --danger: #ef4444;
    --danger-light: #fee2e2;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 1, 0.5, 1);

    --shadow-lg: 0 10px 40px -10px rgba(15, 23, 42, 0.15);

    --font-stack: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; }

body {
    font-family: var(--font-stack);
    background-color: var(--bg-soft);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex: 1;
}

/* Background shapes */
.login-bg-shapes {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: floatShape 20s infinite ease-in-out alternate;
}
.shape-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(14, 165, 233, 0.05) 100%);
    top: -10%; left: -10%;
}
.shape-2 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.2) 0%, rgba(6, 182, 212, 0.02) 100%);
    bottom: -10%; right: -10%;
    animation-delay: -5s;
}
@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

/* Header */
.main-header {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img { height: 30px; width: auto; display: block; }
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-fast);
}
.btn-back:hover { color: var(--primary); }
.btn-back svg { width: 16px; height: 16px; }

/* Main / card */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    position: relative;
    z-index: 1;
}
.login-card-container {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}
.login-card-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-brand-icon {
    width: 54px; height: 54px;
    background-color: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--primary);
}
.login-brand-icon svg { width: 28px; height: 28px; }
.login-card-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
.login-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Social buttons */
.login-socials {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}
.login-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
}
.login-social svg { flex-shrink: 0; width: 20px; height: 20px; }

.login-social.is-google {
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.login-social.is-google:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.login-social.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Alert */
.alert-toast {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    display: none;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.alert-toast.show {
    display: flex;
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.alert-toast svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Footer */
.login-footer {
    width: 100%;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background-color: #fff;
    position: relative;
    z-index: 1;
}
.login-footer p { font-size: 0.8rem; color: var(--text-muted); }
.login-footer a { color: var(--primary); font-weight: 700; }

@media (max-width: 480px) {
    .login-card-container { padding: 2.25rem 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .shape { animation: none; }
    .login-social { transition: none; }
}
