/* ==========================================================================
   Quda Live – auth pages (sign in, etc.)
   Same greens as the admin panel theme (taken from the Quda logo)
   ========================================================================== */

:root {
    --q-green: #07a861;
    --q-green-600: #038d5c;
    --q-green-700: #07772b;
    --q-green-900: #04432a;
    --q-green-950: #022e1d;
    --q-green-50: #e8fdec;
    --q-green-100: #c9f7da;
    --q-teal: #04c68a;
    --q-mint: #91fabf;
    --q-orange: #f97316;
    --q-text: #1f2d27;
    --q-muted: #6b7c74;
    --q-border: #d6ebde;
}

html,
body.q-auth {
    min-height: 100%;
}

body.q-auth {
    margin: 0;
    font-family: 'Poppins', Helvetica, Arial, sans-serif;
    color: var(--q-text);
    background: #f1faf4;
}

.q-auth-wrap {
    display: flex;
    min-height: 100vh;
}

/* ---------------- brand side ---------------- */
.q-auth-brand {
    position: relative;
    overflow: hidden;
    flex: 0 0 46%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 56px;
    color: #ffffff;
    background:
        radial-gradient(circle at 90% 8%, rgba(4, 198, 138, .55) 0, rgba(4, 198, 138, 0) 38%),
        radial-gradient(circle at 0% 100%, rgba(145, 250, 191, .25) 0, rgba(145, 250, 191, 0) 40%),
        linear-gradient(160deg, var(--q-green-700) 0%, var(--q-green-900) 60%, var(--q-green-950) 100%);
}

/* "Q" rings like the logo */
.q-auth-brand::before,
.q-auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.q-auth-brand::before {
    right: -140px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border: 60px solid rgba(145, 250, 191, .08);
}

.q-auth-brand::after {
    right: 90px;
    top: 120px;
    width: 18px;
    height: 18px;
    background: var(--q-mint);
    opacity: .5;
    box-shadow: -60px 70px 0 -5px rgba(145, 250, 191, .45), 40px 120px 0 -7px rgba(145, 250, 191, .35);
}

.q-brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.q-brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    text-decoration: none;
}

.q-brand-logo:hover {
    color: #ffffff;
}

.q-brand-logo img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.q-brand-logo span {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.q-brand-logo span b {
    color: var(--q-mint);
    font-weight: 700;
}

.q-brand-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease;
}

.q-brand-back:hover {
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
}

.q-brand-middle {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.q-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: var(--q-mint);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.q-brand-eyebrow .q-dot {
    color: #ff5a5a;
    font-size: .6rem;
    animation: q-pulse 1.6s ease-in-out infinite;
}

@keyframes q-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

.q-brand-title {
    margin: 18px 0 12px;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
}

.q-brand-title span {
    background: linear-gradient(90deg, var(--q-mint), var(--q-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.q-brand-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
}

.q-brand-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.q-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(6px);
    font-size: .85rem;
    font-weight: 500;
}

.q-feature-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--q-green), var(--q-teal));
    color: #ffffff;
    font-size: .85rem;
}

/* ---------------- form side ---------------- */
.q-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.q-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--q-border);
    box-shadow: 0 30px 60px -20px rgba(4, 67, 42, .18);
}

.q-auth-card-logo {
    display: none;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(7, 168, 97, .3);
}

.q-auth-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--q-green-900);
}

.q-auth-sub {
    margin: 6px 0 28px;
    color: var(--q-muted);
    font-size: .95rem;
}

.q-field {
    margin-bottom: 18px;
}

.q-field label {
    display: block;
    margin-bottom: 7px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--q-text);
}

.q-input {
    position: relative;
}

.q-input > .qi {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--q-green);
    font-size: .95rem;
    pointer-events: none;
}

.q-auth .q-input .form-control {
    height: 52px;
    padding-left: 46px;
    border: 1px solid var(--q-border);
    border-radius: 14px;
    background: #f7fcf9;
    font-size: .95rem;
    color: var(--q-text);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.q-auth .q-input .form-control::placeholder {
    color: #9aaba2;
}

.q-auth .q-input .form-control:focus {
    border-color: var(--q-green);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(7, 168, 97, .14);
}

.q-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 24px;
    font-size: .88rem;
}

.q-auth .form-check-input:checked {
    background-color: var(--q-green);
    border-color: var(--q-green);
}

.q-auth .form-check-input:focus {
    border-color: var(--q-green);
    box-shadow: 0 0 0 .2rem rgba(7, 168, 97, .2);
}

.q-auth .form-check-label {
    color: var(--q-muted);
}

.q-link {
    color: var(--q-green);
    font-weight: 600;
    text-decoration: none;
}

.q-link:hover {
    color: var(--q-green-700);
    text-decoration: underline;
}

.q-btn {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--q-green) 0%, var(--q-teal) 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .03em;
    box-shadow: 0 14px 28px -10px rgba(7, 168, 97, .6);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.q-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -10px rgba(7, 168, 97, .7);
}

.q-btn:disabled {
    filter: grayscale(.3);
    opacity: .75;
    transform: none;
}

.q-auth-alert {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff4ec;
    border: 1px solid #fed7b5;
    color: #b45309;
    font-size: .88rem;
    text-align: center;
}

.q-auth-alert:empty {
    display: none !important;
}

.q-auth-loading {
    margin-top: 16px;
    text-align: center;
}

.q-auth-loading img {
    max-height: 40px;
}

.q-auth-foot {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--q-border);
    text-align: center;
    font-size: .9rem;
    color: var(--q-muted);
}

/* ---------------- responsive ---------------- */
@media (max-width: 991.98px) {
    .q-auth-wrap {
        flex-direction: column;
    }

    .q-auth-brand {
        flex: none;
        padding: 26px 24px 34px;
        gap: 22px;
    }

    .q-brand-title {
        font-size: 1.8rem;
        margin: 14px 0 8px;
    }

    .q-brand-features {
        display: none;
    }

    .q-auth-main {
        margin-top: -22px;
        padding: 0 16px 32px;
        align-items: flex-start;
    }

    .q-auth-card {
        position: relative;
        padding: 30px 22px;
    }
}

@media (max-width: 575.98px) {
    .q-brand-middle {
        display: none;
    }

    .q-brand-logo span {
        font-size: 1.2rem;
    }

    .q-brand-back span {
        display: none;
    }

    .q-auth-main {
        margin-top: 0;
        padding-top: 22px;
    }

    .q-auth-card-logo {
        display: block;
    }

    .q-auth-title,
    .q-auth-sub {
        text-align: center;
    }
}

/* icons (Phosphor duotone sprite) */
.qi {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    vertical-align: -0.22em;
}

.q-brand-eyebrow .q-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a5a;
}

.q-input > .qi { width: 20px; height: 20px; }
.q-feature-icon .qi { width: 18px; height: 18px; }
.q-btn .qi { width: 20px; height: 20px; }