/* 
   FlipEarth Redesign - Login / Register / Menu 
   Focus: Clean, International, Mobile-first
*/

:root {
    /* Palette from user request */
    --fe-primary: #021a42;
    /* Deep Blue / Indigo */
    --fe-primary-hover: #032b6b;
    --fe-accent: #d4af37;
    /* Gold (Travel & Trust) */
    --fe-accent-green: #2ecc71;
    /* Light Green - Success/Safe */
    --fe-bg: #f4f7f6;
    /* Light background for the page */
    --fe-white: #ffffff;
    --fe-text: #333333;
    --fe-text-light: #777777;
    --fe-border: #e0e0e0;
    --fe-border-focus: #021a42;
    /* Focus glow color */

    /* Spacing & Layout */
    --fe-radius: 12px;
    --fe-container-max: 420px;
    --fe-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* --- Global Overrides for Auth Pages --- */
body.auth-page {
    background-color: var(--fe-bg);
    font-family: 'Inter', sans-serif;
    /* Ensuring modern font */
    color: var(--fe-text);
}

/* --- Layout Utility --- */
.fe-container {
    padding: 0 15px;
    margin: 0 auto;
    width: 100%;
}

/* --- Auth Card Layout (Desktop) --- */
.auth-wrapper {
    min-height: calc(100vh - 80px);
    /* Minus header height approx */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.auth-card {
    background: var(--fe-white);
    width: 100%;
    max-width: var(--fe-container-max);
    border-radius: var(--fe-radius);
    box-shadow: var(--fe-shadow);
    overflow: hidden;
    position: relative;
    padding: 30px 40px;
}

/* --- Tabs (Login | Register) --- */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--fe-bg);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fe-text-light);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: var(--fe-primary);
}

.auth-tab.active {
    color: var(--fe-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--fe-primary);
}

/* --- Form Styles --- */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--fe-text);
    font-size: 0.95rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--fe-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fdfdfd;
}

.auth-form .form-control:focus {
    border-color: var(--fe-primary);
    box-shadow: 0 0 0 3px rgba(2, 26, 66, 0.1);
    /* Glow effect */
    outline: none;
    background: var(--fe-white);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--fe-text-light);
}

/* --- Buttons --- */
.btn-auth-primary {
    width: 100%;
    background-color: var(--fe-primary);
    color: var(--fe-white);
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-auth-primary:hover {
    background-color: var(--fe-primary-hover);
}

.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider span {
    background: var(--fe-white);
    padding: 0 10px;
    color: var(--fe-text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--fe-border);
    z-index: 0;
}

.btn-social {
    width: 100%;
    background: var(--fe-white);
    border: 1px solid var(--fe-border);
    color: var(--fe-text);
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-social:hover {
    background: #f9f9f9;
    border-color: #ccc;
    text-decoration: none;
    color: var(--fe-text);
}

.btn-social img {
    width: 20px;
    height: 20px;
}

/* --- Utilities --- */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--fe-primary);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--fe-text-light);
    margin-bottom: 20px;
}

.terms-check input {
    margin-top: 3px;
}

/* --- Mobile Specifics --- */
@media (max-width: 576px) {
    .auth-wrapper {
        align-items: flex-start;
        padding: 0;
        background: var(--fe-white);
    }

    .auth-card {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
        padding: 20px;
    }

    .auth-tabs {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .btn-auth-primary {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* Add padding to bottom to account for fixed button */
    .auth-form {
        padding-bottom: 80px;
    }
}

/* --- Menu / Navigation Redesign --- */

/* Navbar Brand */
.navbar-brand img {
    height: 40px;
    /* Slightly larger */
}

.navbar-brand span {
    font-size: 1.25rem;
}

/* Desktop Menu Item */
.nav-link.custom-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-link.custom-nav-link:hover,
.nav-link.custom-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* Avatar Dropdown (Desktop) */
.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.user-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.avatar-circle {
    width: 28px;
    height: 28px;
    background: var(--fe-accent);
    color: var(--fe-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.dropdown-menu-custom {
    border: none;
    box-shadow: var(--fe-shadow);
    border-radius: 12px;
    margin-top: 10px;
    overflow: hidden;
}

.dropdown-item-custom {
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--fe-text);
    transition: background 0.2s;
}

.dropdown-item-custom:hover {
    background: #f7f9fa;
    color: var(--fe-primary);
}

.dropdown-divider {
    margin: 0;
    border-color: #eee;
}

/* Mobile Offcanvas / Drawer */
.mobile-drawer-header {
    background: var(--fe-primary);
    color: white;
    padding: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-user-info .avatar-circle {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    background: var(--fe-white);
    color: var(--fe-primary);
}

.mobile-email {
    font-size: 0.9rem;
    opacity: 0.8;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: var(--fe-text);
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu-link:hover {
    background: #f9f9f9;
    color: var(--fe-primary);
}

.mobile-menu-link i {
    width: 24px;
    color: var(--fe-text-light);
}

.mobile-logout {
    margin-top: auto;
    /* Push to bottom if flex container */
    padding: 20px;
    border-top: 1px solid #eee;
}