/* PHOTON Solar - FusionSolar Style Login Stylesheet (css/auth.css) */
:root {
    --primary-blue: #0077ff;
    --text-dark: #1e293b;
    --color-muted-icon: #94a3b8;
    --font-ar: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
    --font-en: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --radius-pill: 30px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    min-height: 100vh;
    width: 100vw;
    font-family: var(--font-ar);
    background: url('../assets/fusion_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

[dir="ltr"] body {
    font-family: var(--font-en);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 25, 55, 0.25) 0%, rgba(10, 25, 55, 0.1) 40%, rgba(5, 15, 35, 0.75) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ─── Top Bar ──────────────────────────────────────────────────────────────── */
.fusion-topbar {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 40px;
}

.lang-dropdown-wrap {
    position: relative;
}

.top-select-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    padding: 7px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-select-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
    animation: zoomIn 0.2s ease-out;
}

[dir="ltr"] .lang-dropdown-menu {
    right: auto;
    left: 0;
}

.lang-dropdown-menu.open {
    display: flex;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.lang-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
}

.lang-menu-item:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
}

.lang-menu-item.active {
    background: rgba(0, 119, 255, 0.1);
    color: var(--primary-blue);
}

/* ─── Center Login Hero ────────────────────────────────────────────────────── */
.fusion-hero {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 820px;
    padding: 0 20px;
    margin-top: -30px;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.hero-logo {
    height: 140px;
    max-width: 420px;
    object-fit: contain;
    filter: drop-shadow(0 6px 24px rgba(0, 119, 255, 0.5));
    transition: var(--transition);
}

.hero-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 8px 30px rgba(0, 195, 255, 0.65));
}

/* ─── Horizontal Capsule Login Bar ─────────────────────────────────────────── */
.capsule-login-bar {
    width: 100%;
    max-width: 760px;
    background: #ffffff;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    padding: 5px 6px;
    gap: 4px;
    transition: var(--transition);
}

.capsule-login-bar:focus-within {
    box-shadow: 0 12px 35px rgba(0, 119, 255, 0.35), 0 0 0 2px var(--primary-blue);
}

.capsule-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
}

.capsule-divider {
    width: 1px;
    height: 26px;
    background: #e2e8f0;
}

.capsule-icon {
    color: var(--color-muted-icon);
    font-size: 16px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.capsule-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-dark);
    font-weight: 500;
}

.capsule-input::placeholder {
    color: var(--color-muted-icon);
    font-size: 14px;
}

.capsule-input:-webkit-autofill,
.capsule-input:-webkit-autofill:hover, 
.capsule-input:-webkit-autofill:focus, 
.capsule-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: #1e293b !important;
    transition: background-color 5000s ease-in-out 0s;
}

.capsule-toggle-pwd {
    background: transparent;
    border: none;
    color: var(--color-muted-icon);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.capsule-toggle-pwd:hover {
    color: var(--primary-blue);
    background: rgba(0, 119, 255, 0.08);
}

.capsule-btn-login {
    background: linear-gradient(135deg, #1890ff 0%, #0070e0 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 36px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 119, 255, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.capsule-btn-login:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #096dd9 100%);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.55);
    transform: translateY(-1px);
}

.capsule-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 119, 255, 0.3);
}

/* ─── Bottom Sub-links ─────────────────────────────────────────────────────── */
.fusion-sublinks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
}

.sublink-item {
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.sublink-item:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.sublink-sep {
    color: rgba(255, 255, 255, 0.4);
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.fusion-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.6;
    padding: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-links {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.22s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #0f1a30;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.toast.success { border-color: #10b981; color: #34d399; }
.toast.error   { border-color: #ef4444; color: #f87171; }

@media (max-width: 640px) {
    .capsule-login-bar {
        flex-direction: column;
        border-radius: 16px;
        padding: 12px;
    }
    .capsule-divider {
        display: none;
    }
    .capsule-btn-login {
        width: 100%;
        border-radius: 10px;
        margin-top: 6px;
    }
}
