/* Logged-out pages (account/base_login.html): login, password flows, set-password and the
   landing page. Tokens and components.css load first; this sheet only adds the dark
   branded backdrop and the centred card. */

body {
    font-family: var(--font-sans);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

/* Backdrop: the app's dark brand gradient with faint soundwave marks */
.login-background {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--violet-deep) 0%, var(--ink-bg) 100%);
    z-index: -2;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Crect x='40' y='50' width='80' height='3' rx='1.5'/%3E%3Ccircle cx='150' cy='50' r='4'/%3E%3Crect x='180' y='50' width='40' height='3' rx='1.5'/%3E%3Crect x='25' y='90' width='30' height='3' rx='1.5'/%3E%3Crect x='65' y='90' width='55' height='3' rx='1.5'/%3E%3Ccircle cx='135' cy='90' r='3'/%3E%3Crect x='185' y='130' width='65' height='3' rx='1.5'/%3E%3Ccircle cx='175' cy='130' r='3'/%3E%3Crect x='45' y='130' width='120' height='3' rx='1.5'/%3E%3Crect x='80' y='170' width='30' height='3' rx='1.5'/%3E%3Ccircle cx='65' cy='170' r='5'/%3E%3Crect x='125' y='170' width='85' height='3' rx='1.5'/%3E%3Ccircle cx='220' cy='170' r='3'/%3E%3Crect x='150' y='210' width='105' height='3' rx='1.5'/%3E%3Ccircle cx='140' cy='210' r='4'/%3E%3Crect x='20' y='210' width='110' height='3' rx='1.5'/%3E%3Crect x='55' y='250' width='60' height='3' rx='1.5'/%3E%3Ccircle cx='125' cy='250' r='3'/%3E%3Crect x='135' y='250' width='45' height='3' rx='1.5'/%3E%3Ccircle cx='190' cy='250' r='5'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.8;
    animation: gradientShift 12s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { opacity: 0.6; transform: translateX(0); }
    100% { opacity: 0.9; transform: translateX(20px); }
}

.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}
.shape {
    position: absolute;
    height: 3px;
    border-radius: 2px;
    opacity: 0.05;
    animation: float 8s ease-in-out infinite;
}
.shape-1 { width: 80px; top: 20%; left: 15%; background: var(--gradient-accent); }
.shape-2 { width: 120px; top: 70%; right: 20%; background: color-mix(in srgb, var(--surface) 80%, transparent); animation-delay: 3s; }
.shape-3 { width: 60px; bottom: 30%; left: 25%; background: linear-gradient(90deg, var(--crimson), transparent); animation-delay: 6s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.05; }
    50% { transform: translateY(-10px) scaleX(1.2); opacity: 0.08; }
}

.login-container {
    width: 100%;
    min-height: 100vh;
    padding: 20px 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-section { text-align: center; line-height: 0; }
.login-logo {
    width: 240px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--ink-bg) 20%, transparent));
}

/* The card: the app's surface and radius, a modal-weight shadow, the brand bar on top */
.login-card {
    position: relative;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
    color: var(--ink-body);
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.login-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-card .form-label { font-size: var(--text-sm); margin-bottom: 0.375rem; }
.login-card .form-control {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: var(--text-md);
    color: var(--ink);
}
.login-card .form-check-label { color: var(--ink); }

/* Full-width primary action; colour and hover come from components.css .btn-primary */
.login-card .btn-primary {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: var(--text-md);
    font-weight: 600;
    border-radius: 8px;
}

/* Social sign-in buttons and the "or" divider */
.login-card .btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.login-card .btn-social:hover { background: var(--surface-muted); box-shadow: var(--shadow-rest); text-decoration: none; }
.btn-social img { width: 1.25rem; height: 1.25rem; margin-right: 0.75rem; object-fit: contain; }

.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: var(--ink-mute);
}
.divider::before,
.divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--rule); }
.divider span { padding: 0 1rem; font-size: var(--text-sm); font-weight: 500; }

.login-card .text-muted { font-size: var(--text-sm); line-height: 1.4; }
.login-card a:not(.btn):not(.btn-social) { color: var(--orange-ink); font-weight: 600; text-decoration: none; }
.login-card a:not(.btn):not(.btn-social):hover { text-decoration: underline; }

@media (max-width: 768px) {
    .login-container { padding: 0 1rem; }
    .logo-section { margin: 20px 0; }
    .login-logo { width: 200px; }
    .login-card { padding: 1.5rem; max-width: 100%; }
}
@media (max-width: 480px) {
    .login-card { padding: 1.25rem; }
    .login-logo { width: 160px; }
}

/* The big icon above a confirmation message */
.login-hero-icon { font-size: 3rem; color: var(--ink); }
.login-hero-icon.is-success { color: var(--success); }
