/* Modern Arabic UI Styles - RTL, Minimal, Responsive */
@import url('sidebar-toggle.css');

body {
  font-family: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', 'Noto Sans Arabic', Arial, sans-serif;
  font-size: 0.85rem;
  background: #f7f8fa;
  margin: 0;
  direction: rtl;
  color: #222;
}
.main-header {
  background: #fff;
  box-shadow: 0 2px 8px #0001;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  width: 40px;
  height: 40px;
}
.system-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a237e;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.lang-switch {
  background: #e3e7fd;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1a237e;
  cursor: pointer;
  transition: background 0.2s;
}
.lang-switch:hover {
  background: #c5cae9;
}
.user-icon img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e3e7fd;
}
.layout {
  display: flex;
  min-height: 100vh;
}
.main-sidebar {
  width: 220px;
  background: #fff;
  box-shadow: 2px 0 8px #0001;
  padding: 2rem 0.5rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav li {
  margin-bottom: 1.2rem;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #222;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: #e3e7fd;
  color: #1a237e;
}
.icon {
  font-size: 1.3rem;
}
.main-content {
  flex: 1;
  padding: 2.5rem 2rem;
  background: #f7f8fa;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .main-sidebar {
    width: 60px;
    padding: 1rem 0.2rem;
  }
  .sidebar-nav a span:not(.icon) {
    display: none;
  }
  .main-content {
    padding: 1.2rem 0.5rem;
  }
}
@media (max-width: 600px) {
  .main-header {
    padding: 0.5rem 0.5rem;
  }
  .main-sidebar {
    display: none;
  }
  .main-content {
    padding: 1rem 0.2rem;
  }
}

/* Role-based Theme Classes */
/* Admin Theme - Deep Navy Blue (#1F3A66) */
.admin-theme .system-title {
  color: #1F3A66;
}

.admin-theme .lang-switch {
  background: #e8f0fe;
  color: #1F3A66;
}

.admin-theme .lang-switch:hover {
  background: #d1e7ff;
}

.admin-theme .sidebar-nav a:hover,
.admin-theme .sidebar-nav a.active {
  background: #e8f0fe;
  color: #1F3A66;
}

.admin-theme .main-header {
  border-bottom: 3px solid #1F3A66;
}

/* Professor Theme - Moderate Teal (#009688) */
.professor-theme .system-title {
  color: #009688;
}

.professor-theme .lang-switch {
  background: #e0f2f1;
  color: #009688;
}

.professor-theme .lang-switch:hover {
  background: #b2dfdb;
}

.professor-theme .sidebar-nav a:hover,
.professor-theme .sidebar-nav a.active {
  background: #e0f2f1;
  color: #009688;
}

.professor-theme .main-header {
  border-bottom: 3px solid #009688;
}

/* Student Theme - Bright Sky Blue (#2196F3) */
.student-theme .system-title {
  color: #2196F3;
}

.student-theme .lang-switch {
  background: #e3f2fd;
  color: #2196F3;
}

.student-theme .lang-switch:hover {
  background: #bbdefb;
}

.student-theme .sidebar-nav a:hover,
.student-theme .sidebar-nav a.active {
  background: #e3f2fd;
  color: #2196F3;
}

.student-theme .main-header {
  border-bottom: 3px solid #2196F3;
}

/* Universal Arabic Typography Enhancements */
* {
  font-family: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', 'Noto Sans Arabic', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', 'Noto Sans Arabic', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

p, span, div, a, button, input, textarea, select, label {
  font-family: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', 'Noto Sans Arabic', Arial, sans-serif;
  font-size: 0.85rem;
}

/* Role-specific header styling */
.admin-theme .main-header {
  background: #1F3A66;
  color: #fff;
}

.admin-theme .main-header .system-title {
  color: #fff;
}

.professor-theme .main-header {
  background: #009688;
  color: #fff;
}

.professor-theme .main-header .system-title {
  color: #fff;
}

.student-theme .main-header {
  background: #2196F3;
  color: #fff;
}

.student-theme .main-header .system-title {
  color: #fff;
}

/* Role-specific sidebar styling */
.admin-theme .main-sidebar,
.admin-theme .sidebar {
  background: #1F3A66;
  color: #fff;
}

.admin-theme .sidebar-nav a,
.admin-theme .sidebar a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  line-height: 1.2;
  transition: background 0.2s;
}

.admin-theme .sidebar-nav a:hover,
.admin-theme .sidebar a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.professor-theme .main-sidebar,
.professor-theme .sidebar {
  background: #009688;
  color: #fff;
}

.professor-theme .sidebar-nav a,
.professor-theme .sidebar a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  line-height: 1.2;
  transition: background 0.2s;
}

.professor-theme .sidebar-nav a:hover,
.professor-theme .sidebar a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.student-theme .main-sidebar,
.student-theme .sidebar {
  background: #2196F3;
  color: #fff;
}

.student-theme .sidebar-nav a,
.student-theme .sidebar a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  line-height: 1.2;
  transition: background 0.2s;
}

.student-theme .sidebar-nav a:hover,
.student-theme .sidebar a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Category header styling for all themes */
.category-header {
  margin-top: 0.6rem;
  padding: 0.3rem 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.category-header:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.category-content {
  display: block;
}

/* Role-specific button styling */
.admin-theme .btn-primary {
  background-color: #1F3A66;
  border-color: #1F3A66;
}

.admin-theme .btn-primary:hover {
  background-color: #0d2a4a;
  border-color: #0d2a4a;
}

.professor-theme .btn-primary {
  background-color: #009688;
  border-color: #009688;
}

.professor-theme .btn-primary:hover {
  background-color: #00695c;
  border-color: #00695c;
}

.student-theme .btn-primary {
  background-color: #2196F3;
  border-color: #2196F3;
}

.student-theme .btn-primary:hover {
  background-color: #1976d2;
  border-color: #1976d2;
}
