:root {
    --primary-color: #0F766E;
    --primary-dark: #0a5a54;
    --primary-light: #14b8a6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    right: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.logo {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 28px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-nav a i {
    width: 24px;
    font-size: 18px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 24px;
}

/* Header */
.header {
    background: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.header-title p {
    color: var(--text-light);
    font-size: 14px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 20px;
    color: var(--text-light);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-type {
    font-size: 12px;
    color: var(--text-light);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Profile Page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 600;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.profile-info p {
    opacity: 0.9;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.info-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.password-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.password-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 16px;
}

/* Home Page */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.category-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-price {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
}

.product-rating {
    color: #fbbf24;
    margin-bottom: 15px;
}

/* Login/Register Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 20px;
}

.auth-header h2 {
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-light);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
}

/* Utilities */
.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-center {
    text-align: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}