@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');
:root {
    --primary-dark: #002223;   /* Deepest Teal */
    --secondary-dark: #003738; /* Mid Teal */
    --cream-bg: #FFFAF0;       /* Floral White / Cream */
    --white: #ffffff;
    --text-main: #333;
    --radius: 12px;
}

body {
    background-color: var(--cream-bg);
    font-family: 'Vazirmatn', sans-serif; /* Persian Font */
    direction: rtl; /* Crucial for Persian layout */
    color: var(--primary-dark);
    font-feature-settings: "ss01";
    margin: 0;
    overflow-x: hidden;
}

/* Navigation */
.main-nav {
    background: var(--primary-dark);
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-items {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
}

.nav-items a {
    color: var(--cream-bg);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-items a:hover { color: #80cbc4; }

.nav-items a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background-color: var(--cream-bg);
    transition: width 0.3s;
}

.nav-items a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* در دسکتاپ مخفی است */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--cream-bg); /* یا هر رنگی که برای هدر استفاده کردید */
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

/* خط دوم محو می‌شود */
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

/* خط سوم ۴۵ درجه در جهت معکوس می‌چرخد */
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}



/* Auth Layout */
.auth-container {
    display: flex;
    min-height: 100vh; /* Changed from height to min-height */
    padding-top: 80px;  /* Increased from 60px to give the header more breathing room */
    box-sizing: border-box;
}

/* Right Side: Visual */
.auth-visual {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    display: block;
    /* This ensures the image stays tall even if the form is short */
    min-height: calc(100vh - 80px); 
}

.full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Removes tiny bottom gaps common with inline images */
}

.overlay-text {
    position: absolute;
    bottom: 50px;
    right: 50px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Left Side: Form */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cream-bg);
}

.form-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

/* Base style for all alerts */
.alert {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
}

/* Green Styling for SUCCESS */
.alert.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Red Styling for ERROR / DANGER */
.alert.error, .alert.danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Optional: Yellow for WARNING */
.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* Optional: Blue for INFO */
.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.form-box h2 {
    color: var(--primary-dark);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    text-align: right;
    width: 100%;
    padding: 15px;
    border: 1px solid #003738;
    border-radius: var(--radius);
    background: white;
    font-size: 1rem;
    box-sizing: border-box;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--secondary-dark);
    outline: none;
    box-shadow: 0 0 8px rgba(0, 77, 64, 0.1);
}

/* Force rounded corners on the input even with the icon present */
.password-wrapper input {
    border-radius: var(--radius) !important; /* Forces the soft corners back */
    display: block;
    width: 100%;
    padding-left: 45px;  /* Space for the eye icon on the left */
    padding-right: 15px; /* Standard padding on the right where text starts */
    text-align: right;   /* Keeps Persian text aligned correctly */
}

/* Ensure the wrapper itself doesn't have a border that looks sharp */
.password-wrapper {
    border: none;
    background: transparent;
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--primary-dark); /* Matches your theme color */
    font-size: 1.25rem;
    transition: color 0.3s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--secondary-dark); /* Slight color change on hover */
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.login-link,
.password-reset {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.login-link a {
    color: var(--secondary-dark);
    text-decoration: none;
    font-weight: bold;
}

.form-box form p input, 
.form-box form input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #003738;
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* Responsive Mobile */
@media (max-width: 992px) {
    .auth-visual {
        display: none; /* مخفی کردن تصویر در تبلت و موبایل برای تمرکز روی فرم */
    }
    
    .auth-form-wrapper {
        background-image: linear-gradient(rgba(255,250,240,0.9), rgba(255,250,240,0.9)), 
                          url('./Gemini_Generated_Image_v9w169v9w169v9w1 1.jpg');
        background-size: cover;
    }

    .menu-toggle { display: flex; }

    .nav-items {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--primary-dark);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transition: 0.4s;
    }

    .nav-items.active { right: 0; }
}