/* Same login look as the desktop app (ccagent_frontend/src/pages/Authentication/Login.css). */
:root {
    --primary: #4338ca;
    --primary-hover: #3730a3;
    --bg-light: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

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

body,
html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    font-family: "Inter", sans-serif;
    overflow: hidden;
    color: var(--text-main);
}

#vanta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #ffffff;
}

.vanta-canvas {
    opacity: 0.5 !important;
}

.wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
    pointer-events: none;

    background: radial-gradient(
        circle at center,
        #0000003d 30%,
        rgba(0, 0, 0, 0.25) 120%
    );
}

/* Floating Glass Card */
.login-container {
    width: 100%;
    max-width: 480px;
    background: rgb(255 255 255 / 60%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: 56px 48px;

    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);

    animation: slideFadeUp 0.8s forwards;

    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    pointer-events: auto;
}

.login-container:hover {
    background: rgb(255 255 255 / 95%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border: 1px solid rgba(255, 255, 255, 0.9);

    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 1);
}

.logo-box {
    margin-bottom: 40px;
    text-align: center;
}

.logo-box img {
    max-width: 150px;
}

.greeting {
    margin-bottom: 40px;
    text-align: center;
}

.greeting h1 {
    font-family: "Outfit", sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.greeting p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
}

/* Floating Label Form Fields */
.form-group {
    position: relative;
    margin-bottom: 24px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    transition: color 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 0;
    padding: 26px 16px 10px 48px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;

    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    outline: none;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.02);
}

.form-control::placeholder {
    color: transparent;
}

.floating-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);

    color: #94a3b8;
    font-size: 15px;

    pointer-events: none;

    transition: all 0.2s ease;

    z-index: 5;
}

/* Focus States */
.form-control:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(67, 56, 202, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-control:focus + .floating-label,
.form-control:not(:placeholder-shown) + .floating-label {
    top: 16px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control:focus ~ .input-icon,
.form-control:not(:placeholder-shown) ~ .input-icon {
    color: var(--primary);
}

/* Options */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;

    gap: 10px;

    font-size: 14px;
    font-weight: 500;

    color: var(--text-muted);

    transition: color 0.3s;
}

.checkbox-container:hover {
    color: var(--text-main);
}

.checkbox-container input {
    display: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;

    border: 2px solid #cbd5e1;
    border-radius: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;

    background: #fff;
}

.checkbox-container input:checked + .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-container input:checked + .custom-checkbox::before {
    content: "\f00c";

    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    font-size: 11px;
    color: #fff;
}

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

    font-size: 14px;
    font-weight: 600;

    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;

    padding: 18px;

    background: var(--primary);
    color: #ffffff;

    border: none;
    border-radius: 0;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    box-shadow:
        0 10px 20px rgba(67, 56, 202, 0.25);

    position: relative;
    overflow: hidden;
}

/* Button Shimmer Effect */
.btn-submit::after {
    content: "";

    position: absolute;

    top: -50%;
    left: -60%;

    width: 20%;
    height: 200%;

    background: rgba(255, 255, 255, 0.3);

    transform: rotate(30deg);

    transition:
        all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

    transform: translateY(-3px);

    box-shadow:
        0 15px 30px rgba(67, 56, 202, 0.35);
}

.btn-submit:hover::after {
    left: 120%;
}

.btn-submit:active {
    transform: translateY(0);
}

@keyframes slideFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    body,
    html {
        overflow-y: auto;
    }

    .wrapper {
        height: auto;
        min-height: 100vh;
        padding: 40px 15px;
    }

    .login-container {
        padding: 30px 20px;
        border-radius: 0;
    }

    .greeting h1 {
        font-size: 28px;
    }

    .greeting p {
        font-size: 14px;
    }

    .form-control {
        padding: 22px 16px 8px 44px;
        font-size: 14px;
    }

    .floating-label {
        left: 44px;
        font-size: 14px;
    }

    .options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .btn-submit {
        padding: 16px;
        font-size: 15px;
    }

    .orb-1,
    .orb-2 {
        display: none;
    }
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.field-error {
    display: block;
    margin-top: 5px;
    color: #dc2626;
    font-size: 12px;
}

.login-error {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 0;
    background: #fef2f2;
    color: #dc2626;
    font-size: 13px;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.api-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.4;
    animation: fadeInError 0.3s ease-out;
}

.api-error-message i {
    flex-shrink: 0;
    font-size: 15px;
}

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