/* Basic Reset & Fonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --primary-color: #00acc1;
  /* Cyan/Info tone */
  --primary-dark: #00838f;
  --secondary-color: #26c6da;
  --text-dark: #333333;
  --text-muted: #6c757d;
  --bg-light: #f4f7fa;
  --sidebar-bg: #ffffff;
  --sidebar-hover: #e0f7fa;
  --navbar-bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease-in-out;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  overflow: visible;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-dark);
}

.text-success {
  color: #00b0ff !important;
}

.text-danger {
  color: #ff5252 !important;
}

.bg-info1,
.my-nav-bar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: white !important;
}

/* Layout Wrapper */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* Sidebar */
#sidebar {
  min-width: 260px;
  max-width: 260px;
  background: var(--sidebar-bg);
  color: var(--text-dark);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 1040;
  height: 100vh;
  position: sticky;
  top: 0;
}



#sidebar .sidebar-header {
  padding: 20px;
  background: transparent;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#sidebar .sidebar-header img {
  max-width: 120px;
}

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul li a {
  padding: 12px 20px;
  font-size: 1.1em;
  font-weight: 500;
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  border-right: 4px solid transparent;
}

#sidebar ul li a:hover {
  color: var(--primary-color);
  background: var(--sidebar-hover);
  border-right-color: var(--primary-color);
}

#sidebar ul li.active>a,
a[aria-expanded="true"] {
  color: var(--primary-color);
  background: var(--sidebar-hover);
  border-right-color: var(--primary-color);
  font-weight: 700;
}

/* Content Area */
#content {
  width: 100%;
  padding: 0;
  min-height: 100vh;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

/* Navbar inside dashboard */
.navbar {
  padding: 15px 25px;
  background: var(--navbar-bg) !important;
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
  border-radius: 0;
}

.navbar-brand {
  font-weight: 700;
}

.nav-link.text-light {
  color: var(--text-dark) !important;
  font-weight: 500;
}

.nav-link.text-light:hover {
  color: var(--primary-color) !important;
}

/* Public Header (Header Logout) */
header#header .navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  margin-bottom: 0;
  box-shadow: var(--shadow-md);
}

header#header .navbar .nav-link,
header#header .navbar .navbar-brand {
  color: #fff !important;
}

/* Cards & Forms */
.card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  margin-bottom: 25px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px 25px;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.my_form_admin,
.my_form {
  max-width: 600px;
  margin-top: 40px !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  box-shadow: none !important;
  transition: var(--transition);
  background-color: #f9fbfe;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(0, 172, 193, 0.1) !important;
}

label {
  font-weight: 600;
  color: var(--text-dark);
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary,
.btn-info {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover,
.btn-info:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-danger {
  background: #ff5252;
  border-color: #ff5252;
}

.btn-success {
  background: #00e676;
  border-color: #00e676;
}

/* Footer */
footer {
  background: var(--sidebar-bg) !important;
  color: var(--text-muted) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}

footer .bg-info1 {
  background: transparent !important;
  color: var(--text-muted) !important;
}

/* Responsive Sidebar toggling */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 992px) {
  #sidebar {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100vh;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease-in-out;
    margin: 0;
    z-index: 1050;
  }

  #sidebar.active {
    right: 0 !important;
  }
}

@media (min-width: 993px) {
  #sidebar {
    margin-right: 0;
  }

  #sidebar.active {
    margin-right: -260px;
  }
}