:root {
    --primary: #FF5722;
    --dark: #1a1a1a;
    --light: #f4f4f4;
    --white: #fff;
    --gray: #666;
    --border: #ddd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Tajawal', sans-serif; background: var(--light); height: 100vh; overflow: hidden; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--dark); }
.login-container { background: var(--white); padding: 40px; border-radius: 12px; width: 100%; max-width: 400px; text-align: center; }
.login-header h1 { color: var(--primary); margin-bottom: 10px; }
.login-header p { color: var(--gray); margin-bottom: 30px; }

/* Layout */
.app-container { display: flex; height: 100vh; }
.sidebar { width: 250px; background: var(--dark); color: var(--white); display: flex; flex-direction: column; }
.logo { padding: 20px; font-size: 1.2rem; font-weight: bold; border-bottom: 1px solid #333; display: flex; align-items: center; gap: 10px; }
.nav-menu { flex: 1; padding: 20px 0; }
.nav-link { display: block; padding: 12px 20px; color: #aaa; text-decoration: none; transition: 0.3s; }
.nav-link:hover, .nav-link.active { background: var(--primary); color: var(--white); }
.nav-link i { margin-left: 10px; width: 20px; }
.user-info { padding: 20px; border-top: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }

.main-content { flex: 1; padding: 30px; overflow-y: auto; }
.view { display: none; }
.view.active { display: block; }
.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-title { font-size: 1.5rem; color: var(--dark); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { background: var(--white); padding: 20px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 20px; }
.stat-card i { font-size: 2rem; color: var(--primary); opacity: 0.8; }
.stat-info h3 { font-size: 0.9rem; color: var(--gray); margin-bottom: 5px; }
.stat-info span { font-size: 1.5rem; font-weight: bold; }

/* Tables */
.table-container { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 15px; text-align: right; border-bottom: 1px solid var(--light); }
.data-table th { background: #f9f9f9; font-weight: 600; }
.table-img { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; }

/* Forms & Buttons */
.form-group { margin-bottom: 20px; text-align: right; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 5px; }
.btn-primary { background: var(--primary); color: var(--white); border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.btn-secondary { background: var(--gray); color: var(--white); border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-danger { background: #dc3545; color: white; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.active { display: flex; }
.modal-content { background: var(--white); padding: 30px; border-radius: 10px; width: 500px; max-width: 90%; }
.modal-content h3 { margin-bottom: 20px; }

.error-msg { color: #dc3545; margin-top: 10px; font-size: 0.9rem; }
.hidden { display: none; }
