@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

body {
    font-family: 'Nunito', sans-serif;
}

.form-card {
    border-top: 4px solid #1c77f2;
}

@media (min-width: 640px) {
    .form-card {
        border-top: none;
    }
}

h3 {
    line-height: 1;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 380px;
}

.toast {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(90deg, #1c77f2, #1466d3);
    color: #f5f5f5;
    padding: 1rem 2.5rem 1rem 5rem;
    border-radius: 0.25rem;
    position: relative;
    font-weight: 300;
    text-align: left;
    border: 0.15rem solid #fff2;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast:before {
    content: "";
    position: absolute;
    width: 5.5rem;
    height: calc(100% + 0.3rem);
    bottom: -0.15rem;
    left: -0.15rem;
    z-index: 0;
    border-radius: 0.35rem;
    background:
        radial-gradient(circle at 0% 50%, var(--clr), transparent 5rem),
        radial-gradient(circle at -50% 50%, var(--bg), transparent 5rem);
    opacity: 0.5;
}

.toast:after {
    content: var(--icon);
    position: absolute;
    width: 3rem;
    height: 3rem;
    background: radial-gradient(circle at 50% 50%, var(--clr) 1.05rem, var(--brd) calc(1.05rem + 1px) 100%);
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
}

.toast h3 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.35rem;
    font-weight: 400;
    position: relative;
}

.toast p {
    position: relative;
    font-size: 0.85rem;
    z-index: 1;
    margin: 0.2rem 0 0;
    opacity: 0.8;
}

.toast-close {
    position: absolute;
    width: 1.35rem;
    height: 1.35rem;
    right: 0.65rem;
    top: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    background: none;
    color: #f5f5f5;
    font-size: 1.6rem;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    background: var(--clr);
    color: #22232c;
}

.toast.error {
    --bg: #851d41;
    --clr: #db3056;
    --brd: #db305640;
    --icon: "+";
}

.toast.error:after {
    font-size: 2.2rem;
    line-height: 1rem;
    transform: translateY(-50%) rotate(45deg);
}

.toast.warning {
    --bg: #c24914;
    --clr: #fc8621;
    --brd: #fc862140;
    --icon: "!";
}

.toast.warning:after {
    font-weight: bold;
}

.toast.info {
    --bg: #05478a;
    --clr: #0070e0;
    --brd: #0070e040;
    --icon: "?";
}

.form-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-section.hidden-form {
    display: none;
}

.form-section.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-error {
    border-color: #ef4444 !important;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary {
    background-color: #1c77f2;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #5fa2fc;
}

.btn-primary:after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    transition: none;
}

.btn-primary:hover:after {
    left: 120%;
    transition: left 0.6s ease;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading:after {
    display: none;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    transition: color 0.2s;
    outline: none;
}

.toggle-password:hover {
    color: #4b5563;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    display: block;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #6366f1;
}

.remember-me label {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.image-panel {
    background-image: url('../img/login_bg.jpg');
    background-position: center center;
}

.image-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgb(2 64 204 / 61%) 100%);
}

.z-1 {
    z-index: 1;
}

.toggle-password svg.hidden-icon {
    display: none;
}
