/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #1a1a2e;
    --accent-color: #f39c12;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --medium-gray: #7f8c8d;
    --dark-gray: #1a252f;
    --success-color: #28a745;
    --error-color: #dc3545;
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

/* ==================== Auth Styles ==================== */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.auth-sidebar {
    width: 30%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.brand-logo i {
    color: var(--accent-color);
}

.sidebar-content {
    flex: 1;
}

.sidebar-content h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.subtitle {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: block;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ecf0f1;
}

.feature-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.sidebar-footer {
    color: #bdc3c7;
    font-size: 0.8rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth Content */
.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #fff;
}

.auth-tabs {
    width: 100%;
    max-width: 500px;
}

.tab-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tab-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tab-header p {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--medium-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

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

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.auth-form.active {
    display: block;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
    outline: none;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 3rem;
    color: var(--medium-gray);
    font-size: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    background-color: var(--light-gray);
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.7rem;
    display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-gray);
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background-color: var(--dark-gray);
    transform: translateY(-2px);
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.switch-tab {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.switch-tab:hover {
    color: var(--dark-gray);
    text-decoration: underline;
}

/* ==================== Dashboard Styles ==================== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-right: 3px solid var(--accent-color);
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.user-avatar i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
}

.user-role {
    font-size: 0.8rem;
    color: #bdc3c7;
}

.logout-btn {
    color: #bdc3c7;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: var(--error-color);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--light-gray);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-gray);
    transform: translateY(-2px);
}

.content {
    flex: 1;
    padding: 2rem;
}

.welcome-card {
    display: flex;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.welcome-text {
    flex: 1;
    padding: 2rem;
}

.welcome-text h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-text p {
    color: var(--medium-gray);
    line-height: 1.7;
}

.welcome-image {
    width: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-image i {
    font-size: 5rem;
    color: var(--accent-color);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-title {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ==================== Alert Styles ==================== */
.custom-alert {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-1rem);
    transition: var(--transition);
    max-width: 90%;
}

.custom-alert.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-alert.success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.custom-alert.error {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.custom-alert i {
    font-size: 1.1rem;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-sidebar {
        width: 100%;
        padding: 1.5rem;
    }
    
    .auth-content {
        padding: 2rem;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .welcome-card {
        flex-direction: column;
    }
    
    .welcome-image {
        width: 100%;
        padding: 2rem;
    }
}