/*=============================================
=            AMBIENT BACKGROUND            =
=============================================*/

/* Same hero slideshow as the landing page, fixed full-viewport behind the card */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.auth-bg .hero-carousel,
.auth-bg .carousel-inner,
.auth-bg .carousel-item {
    height: 100vh;
}
/* Tinted with the theme's own background color, at a high opacity, so the
   photo reads as a faint backdrop and the light/dark card contrast pops. */
.auth-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(243, 247, 244, 0.85);
    pointer-events: none;
}
[data-theme="dark"] .auth-overlay {
    background: rgba(11, 41, 28, 0.88);
}

.auth-pill {
    position: fixed;
    top: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .auth-pill {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.auth-home-toolbar {
    left: 20px;
}

.auth-toolbar {
    right: 20px;
}

.auth-content {
    position: relative;
    z-index: 2;
}

/*=============================================
=            BASE            =
=============================================*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-dark);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/*=====  End of BASE  ======*/

/*=============================================
=            LOGIN            =
=============================================*/

.login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
}

.login__content {
    display: flex;
    justify-content: center;
    width: 100%;
}

.login__forms {
    width: 100%;
    max-width: 420px;
}

.login__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.login__brand-logo {
    height: 96px;
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(30, 111, 74, 0.35));
}

.login__brand-mark {
    position: relative;
    display: inline-block;
}
.login__role-badge {
    position: absolute;
    bottom: -6px;
    inset-inline-end: -10px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    border: 3px solid var(--bg-card);
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}
[data-theme="dark"] .login__role-badge {
    border-color: rgba(18, 35, 71, 0.65);
}

.login__register {
    position: relative;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 2.5rem 2rem;
    text-align: center;
}
[data-theme="dark"] .login__register {
    background: rgba(18, 35, 71, 0.65);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(30, 111, 74, 0.12);
}

.login__title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--title-color);
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
}
.login__title-role {
    color: var(--electric-blue);
}

.login__box {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    align-items: center;
    column-gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-top: 1rem;
    transition: var(--transition);
}
[data-theme="light"] .login__box {
    background: #f8fafc;
}
.login__box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.login__box--error {
    border-color: var(--ember);
    box-shadow: 0 0 0 3px var(--ember-glow);
}

.login__icon {
    font-size: 1.1rem;
    color: var(--electric-blue);
}

.login__toggle-password {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.login__toggle-password:hover {
    color: var(--electric-blue);
}

.login__input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-main);
}

.login__input::placeholder {
    font-family: inherit;
    font-weight: 500;
    color: var(--text-muted);
}

.login__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 1.75rem 0 0.5rem;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    border: none;
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}
.login__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.login__signin {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: var(--electric-blue);
    cursor: pointer;
}
.login__signin:hover {
    filter: brightness(1.2);
}

/*=====  End of LOGIN  ======*/

/*=============================================
=            TOASTS            =
=============================================*/

.toast-container {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ff4e29, #d92c1a);
    border-radius: 30px;
    padding: 12px 20px 12px 12px;
    box-shadow: 0 16px 40px rgba(255, 78, 41, 0.35);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
[dir="rtl"] .toast-item {
    padding: 12px 12px 12px 20px;
}
.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}
.toast-item i {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/*=====  End of TOASTS  ======*/
