/* — Reset & box-sizing — */

:root {
    --primary: #5567ff;
    --primary-content: #ffffff;
    --primary-dark: #1321ab;
    --primary-light: #8895ff;
    --secondary: #ffb455;
    --secondary-content: #552f00;
    --secondary-dark: #ff9d22;
    --secondary-light: #ffca88;
    --background: #f0f0f0;
    --foreground: #fbfbfb;
    --border: #dfdfdf;
    --copy: #262626;
    --copy-light: #666666;
    --copy-lighter: #8c8c8c;
    --success: #55ff55;
    --warning: #ffff55;
    --error: #ff5555;
    --success-content: #005500;
    --warning-content: #555500;
    --error-content: #550000;
}

.dark-theme {
    /* same overrides as before… */
}

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

body,
html {
    font-family: system-ui, sans-serif;
}


/* — Gradient background — */

.bg-decor {
    position: fixed;
    inset: 0;
    background: linear-gradient( 135deg, rgba(136, 149, 255, 0.25), rgba(99, 102, 241, 0.05) 50%, rgba(136, 149, 255, 0.25));
    z-index: 0;
}


/* — Blurred circles — */

.circle,
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(2rem);
}

.c1 {
    top: 5%;
    left: 5%;
    width: 8rem;
    height: 8rem;
    background: rgba(99, 102, 241, 0.1);
}

.c2 {
    top: 10%;
    right: 33%;
    width: 18rem;
    height: 18rem;
    background: rgba(88, 106, 252, 0.32);
    filter: blur(5rem);
}

.c3 {
    top: 10%;
    right: 50%;
    width: 15rem;
    height: 15rem;
    background: rgba(88, 106, 252, 0.11);
}

.c4 {
    top: 33%;
    right: 33%;
    width: 5rem;
    height: 5rem;
    background: rgba(136, 149, 255, 0.15);
    filter: blur(2rem);
}


/* thin bars */

.shape {
    background: rgba(99, 102, 241, 0.2);
    filter: blur(0.5rem);
}

.s1 {
    top: 6rem;
    right: 25%;
    width: 0.25rem;
    height: 4rem;
    transform: rotate(45deg);
}

.s2 {
    bottom: 20%;
    left: 33%;
    width: 0.25rem;
    height: 3rem;
    background: rgba(232, 121, 249, 0.3);
    transform: rotate(12deg);
}

.s3 {
    top: 50%;
    left: 4rem;
    width: 5rem;
    height: 5rem;
    background: rgba(99, 102, 241, 0.15);
    transform: rotate(-12deg);
    filter: blur(2rem);
}


/* — Centered wrapper — */

.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}


/* — Brand — */

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
}

.brand .logo {
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
}

.logo img {
    width: 100%;
}

.brand-name {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-content);
}


/* — Page heading — */

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--primary-content) !important;
    margin-bottom: 1.5rem;
}


/* — Card — */

.card {
    width: 100%;
    max-width: 24rem;
    /* 384px */
    background: var(--primary-content);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    /* center on mobile if narrower than max-width */
    margin-left: auto;
    margin-right: auto;
}


/* Card header */

.card-header {
    padding: 1.5rem;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--copy) !important;
}

.card-header p {
    font-size: 0.875rem;
    color: var(--copy) !important;
}


/* Card body */

.card-body {
    padding: 1.5rem;
}


/* Social buttons */

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    border: 1px solid #ccc;
    background: white;
    transition: background 0.2s;
}

.btn-outline {
    background: transparent;
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}


/* Separator */

.separator {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.separator span {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: #666;
}


/* Form */

.login-form .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.input-icon {
    position: relative;
}

.input-icon .icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #888;
}

.input-icon input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2.5rem;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-icon input:focus {
    border-color: var(--primary);
}


/* Form footer */

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link {
    color: var(--primary);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}


/* Primary button */

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--primary-content);
    border: none;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}


/* Signup link */

.signup-link {
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.signup-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

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


/* Legal note */

.legal {
    font-size: 0.75rem;
    color: var(--copy) !important;
    text-align: center;
}

.legal a {
    color: var(--primary) !important;
    text-decoration: none;
}

.legal a:hover {
    text-decoration: underline;
}


/* — RESPONSIVE TWEAKS — */

@media (max-width: 640px) {
    /* shrink paddings */
    .brand {
        gap: 0
    }
    .login-wrapper {
        padding: 1rem;
    }
    .c3 {
        right: -30%;
        top: 5%;
    }
    /* smaller brand name */
    .brand-name {
        font-size: 1.5rem;
    }
    .logo img {
        width: 2rem;
    }
    /* smaller headings */
    .page-title {
        font-size: 1.4rem;
    }
    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    /* make the card fill almost-full width */
    .card {
        max-width: 100%;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }
    /* reduce form spacing */
    .card-header,
    .card-body {
        padding: 1rem;
    }
    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .btn,
    .btn-primary {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
}