/*
 * #FILE: admin/assets/admin_style.css
 * #DESCRIPTION: ملف التنسيقات النهائي - Nano Edition (Restructured & Cleaned)
 */

/* 1. VARIABLES & RESET */
:root {
  --primary-color: #4A002A;
  --primary-dark: #3A001F;
  --secondary-color: #C2AE6D;
  --secondary-dark: #A18E5A;
  --text-color: #4B4B4B;
  --bg-color: #f8f5f2;
  /* Warm Off-White */
  --card-color: #FFFFFF;
  --border-color: #eee4d5;
  --muted-color: #888888;
  --shadow: 0 10px 30px rgba(74, 0, 42, 0.05);
  --shadow-hover: 0 15px 40px rgba(74, 0, 42, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  --font-ar-primary: 'Almarai', sans-serif;
  --font-ar-heading: 'Almarai', sans-serif;

  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-ar-primary);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Background Pattern (Fixed) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--primary-dark);
  -webkit-mask-image: url('background.svg');
  mask-image: url('background.svg');
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  opacity: 0.07;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Tab buttons (for page navigation) */
.tab-btn {
  font-family: var(--font-ar-heading);
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
  border-bottom-color: var(--primary-color);
  font-weight: bold;
  color: var(--primary-color);
}

/* Tabs Navigation Container */
.tabs-container {
  margin-top: 10px;
}

.tabs-nav {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.tab-content-wrapper {
  width: 100%;
}

/* Welcome/Info Cards */
.welcome-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

/* Button Variants - Missing Classes */
.btn-save {
  background: linear-gradient(135deg, var(--primary-color) 0%, #681845 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(74, 0, 42, 0.2);
  padding: 10px 25px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-family: var(--font-ar-heading);
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-save:hover {
  box-shadow: 0 6px 20px rgba(74, 0, 42, 0.4);
  transform: translateY(-2px);
}

.btn-cancel {
  background: #e74c3c;
  color: #fff;
  padding: 10px 25px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-family: var(--font-ar-heading);
  font-weight: 500;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.btn-full-width {
  width: 100%;
  justify-content: center;
}

/* Success/Error Messages - Enhanced */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid #c3e6cb;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ar-heading);
}

.success-message::before {
  content: "✓";
  font-size: 1.2rem;
  font-weight: bold;
  color: #28a745;
}

.error-message {
  background: #fff5f5;
  color: #e74c3c;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid #fed7d7;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ar-heading);
}

.error-message::before {
  content: "⚠";
  font-size: 1.2rem;
}

/* Role Badges */
.role-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.role-badge.role-supervisor {
  background: rgba(32, 133, 6, 0.1);
  color: #208506;
}

.role-badge.role-manager {
  background: rgba(41, 128, 185, 0.1);
  color: #2980b9;
}

.role-badge.role-therapist {
  background: rgba(194, 174, 109, 0.15);
  color: #C2AE6D;
}

.role-badge.role-therapist_plus {
  background: rgba(142, 68, 173, 0.1);
  color: #8E44AD;
}

.role-badge.role-receptionist {
  background: rgba(240, 126, 34, 0.1);
  color: #f07e22;
}

.role-badge.role-inactive {
  background: rgba(149, 165, 166, 0.1);
  color: #95a5a6;
}

/* Utility Classes */
/* Spacing */
.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.p-1 {
  padding: 0.5rem;
}

.p-2 {
  padding: 1rem;
}

.p-3 {
  padding: 1.5rem;
}

/* Display & Layout */
.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-column {
  flex-direction: column;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.gap-4 {
  gap: 2rem;
}

/* Alignment */
.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

/* Text */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--muted-color);
}

.text-primary {
  color: var(--primary-color);
}

/* Border Radius */
.rounded {
  border-radius: 8px;
}

.rounded-lg {
  border-radius: 16px;
}

.rounded-xl {
  border-radius: 20px;
}

.rounded-full {
  border-radius: 50%;
}

/* Width */
.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

/* 2. MODERN GRID LAYOUT SYSTEM (Full Screen Edition) */
.app-container {
  display: grid;
  grid-template-areas: "content";
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* 2. MODERN FLOATING HEADER (Logo-R, Search-C, User/Actions-L) */
/* 2. MODERN FLOATING HEADER (Logo-R, Search-C, User/Actions-L) */
.fixed-logo-area {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

/* Sidebar Toggle Button (Integrated directly into admin_style) */
.sidebar-toggle-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  background: #fff;
  color: var(--primary-color);
  font-size: 1.4rem;
  transition: all 0.2s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn:hover {
  transform: scale(1.1);
  background: #f9f9f9;
}

.floating-header {
  position: fixed;
  top: 15px;
  /* Reverted to 15px */
  left: 20px;
  right: 100px;
  height: 50px;
  /* Reduced height from 60px */
  display: flex;
  align-items: center;
  z-index: 1100;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.floating-header.header-hidden {
  transform: translateY(-80px);
  opacity: 0;
}

.floating-header>div {
  pointer-events: auto;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Groups Layout */
.header-group-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-group-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Base Circles and Pills */
.header-circle-logo,
.header-circle-action {
  width: 50px;
  /* Reduced from 60px */
  height: 50px;
  /* Reduced from 60px */
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border: 1px solid rgba(74, 0, 42, 0.05);
  text-decoration: none;
  /* overflow: hidden; Removed to allow badges */
}

.header-circle-logo img {
  width: 30px;
  /* Reduced from 35px */
  height: 30px;
  object-fit: contain;
}

.header-circle-action {
  color: var(--primary-color);
  font-size: 1.1rem;
  /* Slightly smaller icon */
  cursor: pointer;
  position: relative;
  /* Ensure absolute children are relative to this */
  overflow: visible;
  /* Allow badge to overlap */
}

/* Notification Badge */
/* Notification Badge */
.notif-badge {
  position: absolute;
  top: -2px;
  /* Adjusted position */
  right: -2px;
  /* Adjusted position */
  background-color: #e74c3c;
  color: white;
  font-size: 0.75rem;
  /* Slightly larger font */
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* border: 2px solid white; REMOVED */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  line-height: normal;
  padding-bottom: 0;
}

/* Sessions Badge (Similar to Notification Badge) */
.sessions-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #3498db;
  /* Blue to differentiate from notifications */
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  line-height: normal;
  padding-bottom: 0;
}

/* Sessions Indicator Hover Effect */
.sessions-indicator {
  cursor: pointer;
  transition: all 0.3s ease;
}

.sessions-indicator:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 12px 30px rgba(52, 152, 219, 0.3) !important;
}

.sessions-indicator i {
  color: #3498db;
}


/* Notification Dropdown Hover Logic */
.notification-area {
  position: relative;
  /* Ensure dropdown is relative to this */
}

.notification-area:hover .notif-dropdown {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: 55px;
  /* Directly below the circle */
  left: 0;
  /* Align to left edge to prevent clipping */
  transform: none;
  /* Remove centering transform */
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #eee;
  z-index: 1000;
  overflow: hidden;
}

.notif-dropdown h5 {
  margin: 0;
  padding: 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
  color: var(--primary-color);
  text-align: center;
}

.notif-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.notif-dropdown ul li a:hover {
  background-color: #f0f2f5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-circle-action:hover,
.header-circle-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(74, 0, 42, 0.15);
}

.logout-btn:hover {
  background: #dc3545;
  color: white;
}

/* Pills (Search & User) */
.search-pill,
.user-pill {
  height: 50px;
  background: white;
  border-radius: 25px;
  display: flex;
  align-items: center;
  padding: 0 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(74, 0, 42, 0.05);
  transition: var(--transition);
}

/* Search Dropdown Results */
.search-pill {
  position: relative;
  /* Ensure dropdown is relative to pill */
  width: 100%;
  /* Ensure pill takes available space */
  gap: 15px;
}

.search-dropdown {
  position: absolute;
  top: 55px;
  left: 0;
  right: 0;
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #eee;
  z-index: 1002;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f9f9f9;
  transition: background 0.2s;
}

.search-result-item:hover {
  background-color: #f0f2f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  background: rgba(74, 0, 42, 0.05);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.search-result-item .info {
  display: flex;
  flex-direction: column;
}

.search-result-item .info strong {
  font-size: 0.95rem;
  color: var(--text-color);
}

.search-result-item .info small {
  font-size: 0.8rem;
  color: #888;
}

.no-results {
  padding: 15px;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

.search-pill {
  width: 100%;
  gap: 15px;
}

.search-pill input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-family: var(--font-ar-primary);
  font-size: 1rem;
}

.search-pill:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(74, 0, 42, 0.1);
  border-color: var(--primary-color);
}

.user-pill {
  gap: 15px;
  padding-left: 15px;
  /* Adjust for badge */
}

.user-pill .user-name {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1rem;
}

.user-pill .role-badge {
  font-size: 0.75rem;
  margin: 0;
}

/* Separator removed */

/* MAIN CONTENT WRAPPER (Unified Padding for Fixed Header) */
.main-wrapper {
  grid-area: content;
  padding: 110px 110px 40px 40px;
  /* Top:110, Right:110 (Sidebar gap), Bottom:40, Left:40 */
  overflow-y: auto;
  height: 100%;
  background: transparent;
  width: 100%;
  transition: padding 0.3s ease;
}


/* FLOATING NANO SIDEBAR (Truly Circular & Floating) */
.floating-nano-sidebar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1200;
  pointer-events: none;
  /* Only children interact */
}

.nano-nav {
  pointer-events: auto;
}

.nano-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nano-nav li {
  position: relative;
}

.nano-nav li a {
  width: 50px;
  /* Reduced from 58px to match Logo */
  height: 50px;
  /* Reduced from 58px to match Logo */
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.1rem;
  /* Matched header actions size */
  border: 1px solid rgba(74, 0, 42, 0.05);
}

.nano-nav li a:hover {
  transform: scale(1.1);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 12px 30px rgba(74, 0, 42, 0.3);
}

.nano-nav li.active a {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 10px 25px rgba(74, 0, 42, 0.4);
  transform: scale(1.05);
}

/* Tooltip on Hover */
.nano-nav li a::after {
  content: attr(data-title);
  position: absolute;
  right: 65px;
  /* Adjusted for smaller button */
  background: var(--primary-color);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nano-nav li a:hover::after {
  opacity: 1;
  visibility: visible;
  right: 60px;
  /* Adjusted */
}

/* BOTTOM NAVIGATION (For Mobile < 992px) */
.bottom-nav {
  position: fixed;
  bottom: 10px;
  /* Reduced bottom margin */
  left: 10px;
  right: 10px;
  height: 60px;
  /* Reduced height to be closer to 50px aesthetic */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 30px;
  display: none;
  /* Desktop hidden */
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  box-shadow: 0 10px 30px rgba(74, 0, 42, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 2000;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #718096;
  text-decoration: none;
  padding: 10px 0;
  transition: all 0.3s ease;
}

.bottom-nav-item i {
  font-size: 1.2rem;
  /* Reduced from 1.5rem to match 50px button prop */
  margin-bottom: 0;
}

.bottom-nav-item.active {
  color: var(--primary-color);
  background: transparent;
  border-top: none;
}

.bottom-nav-item.active i {
  background: var(--primary-color);
  color: white;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 15px rgba(74, 0, 42, 0.3);
}

.bottom-nav-item.active span {
  font-weight: 800;
}

.sidebar-header {
  margin-bottom: 3rem;
  padding-right: 10px;
}

/* Sidebar Toggle Button - Floating at Bottom */
.sidebar-toggle-btn {
  position: absolute;
  bottom: 80px;
  /* Moved higher to avoid user profile */
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.sidebar-toggle-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(74, 0, 42, 0.3);
}

/* Center toggle button when collapsed */
.nano-sidebar.collapsed .sidebar-toggle-btn {
  left: 50%;
  transform: translateX(-50%);
}

.nano-sidebar.collapsed .sidebar-toggle-btn:hover {
  transform: translateX(-50%) scale(1.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary-color), #681845);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(74, 0, 42, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text span {
  font-family: var(--font-ar-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary-color);
  line-height: 1.2;
}

.logo-text small {
  font-size: 0.8rem;
  color: #888;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav li {
  position: relative;
  /* For ::before indicator */
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  border-radius: 12px;
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 1rem;
}

.sidebar-nav li a:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--primary-color);
}

.sidebar-nav li a i {
  width: 25px;
  text-align: center;
  font-size: 1.1rem;
  color: #999;
}

/* Active State */
.sidebar-nav li.active a {
  color: var(--primary-color);
  background: rgba(74, 0, 42, 0.08);
  font-weight: 700;
}

.sidebar-nav li.active a i {
  color: var(--primary-color);
}

.sidebar-nav li.active::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--primary-color);
  border-radius: 4px 0 0 4px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.user-mini-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-mini-profile .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8f5f2;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-mini-profile .info {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 4px;
}

.user-mini-profile .info strong {
  color: var(--text-color);
}

.user-mini-profile .info small {
  color: #aaa;
  font-size: 0.8rem;
}

.user-mini-profile .info .role-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  align-self: flex-start;
}

/* Collapsible Sidebar (Icon-Only Mode) */
.nano-sidebar.collapsed {
  width: 80px;
  /* Removed transition to prevent flash on page load */
}

.nano-sidebar.collapsed .sidebar-header {
  padding: 0;
}

.nano-sidebar.collapsed .logo-text,
.nano-sidebar.collapsed .sidebar-nav li a span,
.nano-sidebar.collapsed .user-mini-profile .info strong,
.nano-sidebar.collapsed .user-mini-profile .info .role-badge,
.nano-sidebar.collapsed .sidebar-submenu-indicator {
  display: none;
}

.nano-sidebar.collapsed .logo {
  justify-content: center;
}

.nano-sidebar.collapsed .sidebar-nav li a {
  justify-content: center;
  padding: 12px 0;
}

.nano-sidebar.collapsed .sidebar-nav li a i {
  width: auto;
  margin: 0;
}

.nano-sidebar.collapsed .user-mini-profile {
  justify-content: center;
}

/* Adjust main wrapper when sidebar is collapsed */
.main-wrapper.expanded {
  margin-right: 80px;
  width: calc(100% - 80px);
  transition: all 0.3s ease;
}

/* Removed legacy main-wrapper */

/* Deleted old Topbar definitions */

.quick-add-btn {
  background: var(--secondary-color) !important;
  color: white !important;
  box-shadow: 0 4px 10px rgba(194, 174, 109, 0.3) !important;
  font-size: 1.3rem !important;
}

.quick-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(194, 174, 109, 0.5) !important;
}

.quick-add-modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

.quick-add-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  background: #f9f9f9;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.quick-add-option:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.quick-add-option i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  font-size: 1.1rem;
}

.quick-add-option .opt-text {
  display: flex;
  flex-direction: column;
}

.quick-add-option .opt-text b {
  font-size: 1.1rem;
  font-family: var(--font-ar-heading);
}

.quick-add-option .opt-text span {
  font-size: 0.85rem;
  color: #888;
}

.notification-area {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #dc3545;
  color: white;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 50%;
}

.notif-dropdown {
  position: absolute;
  top: 50px;
  left: 0;
  width: 300px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1002;
  display: none;
  text-align: right;
  border: 1px solid #f0f0f0;
}

.notif-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notif-dropdown li a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f9f9f9;
}

/* Main Content Area Reset */
.main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.page-title-mobile {
  display: none;
  /* Hidden by default, shown only on mobile */
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-family: var(--font-ar-heading);
}

/* 3. HERO & WIDGETS (Home Page) */
.hero-welcome {
  background: white;
  border-radius: 24px;
  padding: 2rem 3rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.hero-welcome::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(194, 174, 109, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-text h2 {
  font-family: var(--font-ar-heading);
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 0 0 10px 0;
}

.hero-text p {
  color: #888;
  margin: 0;
  font-size: 1rem;
}

.hero-date-box {
  background: #f8f5f2;
  padding: 10px 20px;
  border-radius: 16px;
  color: var(--primary-color);
  font-weight: bold;
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-widgets {
  display: flex;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.dashboard-stat-card {
  flex: 1;
  min-width: 240px;
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.dashboard-stat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.stat-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--bg-color);
  color: var(--primary-color);
  flex-shrink: 0;
}

.stat-icon-wrapper.icon-primary {
  background: rgba(74, 0, 42, 0.08);
  color: var(--primary-color);
}

.stat-icon-wrapper.icon-success {
  background: rgba(46, 204, 113, 0.1);
  color: #27ae60;
}

.stat-icon-wrapper.icon-info {
  background: rgba(52, 152, 219, 0.1);
  color: #2980b9;
}

.stat-icon-wrapper.icon-warning {
  background: rgba(241, 196, 15, 0.1);
  color: #f39c12;
}

.stat-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  color: #888;
  font-weight: 500;
  font-family: var(--font-ar-primary);
}

.stat-content .stat-number {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-color);
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
}

.stat-content .stat-subtext {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 4. WORKFLOW / PATIENT LIST */
.workflow-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.workflow-section-header h3 {
  font-family: var(--font-ar-heading);
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.patient-workflow-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.patient-workflow-card {
  background: white;
  border-radius: 16px;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.patient-workflow-card:hover {
  transform: translateX(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.p-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.p-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.p-details h5 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.p-details span {
  font-size: 0.8rem;
  color: #aaa;
  font-family: 'Outfit', sans-serif;
}

.p-status {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-status.waiting {
  background: rgba(241, 196, 15, 0.1);
  color: #f39c12;
}

.p-status.in_progress {
  background: rgba(52, 152, 219, 0.1);
  color: #2980b9;
}

.p-status.completed {
  background: rgba(46, 204, 113, 0.1);
  color: #27ae60;
}

.p-time {
  font-family: 'Outfit', sans-serif;
  color: #888;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-icon-only {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  background: #f8f5f2;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}

.btn-icon-only:hover {
  background: var(--primary-color);
  color: white;
}

/* 5. TABLES & CARDS (Generic) */
.card {
  font-family: var(--font-ar-heading);
  background: var(--card-color);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 1rem;
}

.data-table th {
  padding: 18px 24px;
  text-align: right;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  color: #555;
  font-weight: 700;
  font-size: 0.9rem;
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid #f9f9f9;
  color: var(--text-color);
  font-size: 0.95rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: #fcfcfc;
}

/* 6. FORMS & BUTTONS */
.form-group {
  margin-bottom: 1.2rem;
  font-family: var(--font-ar-heading);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-ar-primary);
  transition: 0.2s;
}

.form-group input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 0, 42, 0.1);
}

.btn {
  font-family: var(--font-ar-heading);
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #681845 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(74, 0, 42, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(74, 0, 42, 0.4);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-dark);
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-small {
  padding: 5px 12px;
  font-size: 0.85rem;
}

/* 7. KANBAN (Bookings) */
.bookings-kanban {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  flex: 1;
  min-width: 300px;
  background: var(--card-color);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.kanban-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.kanban-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.booking-card {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 12px;
  border-right: 4px solid var(--secondary-color);
  position: relative;
}

.booking-card.status-in_progress {
  border-right-color: var(--primary-color);
}

/* 8. MODALS & UTILITIES */
.admin-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.admin-modal-content {
  font-family: var(--font-ar-primary);
  position: relative;
  background-color: var(--card-color);
  margin: 2% auto;
  /* 2% margin top/bottom */
  padding: 0;
  border: 1px solid var(--border-color);
  width: 95%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  /* Do not exceed viewport height */
}

/* Modal Header */
.admin-modal-header {
  font-family: var(--font-ar-primary);
  flex-shrink: 0;
  padding: 1.2rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-body {
  font-family: var(--font-ar-primary);
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.modal-footer {
  font-family: var(--font-ar-primary);
  flex-shrink: 0;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.close-modal {
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: white;
}

/* Modal Size Variants */
.admin-modal-content.modal-small {
  max-width: 400px;
}

.admin-modal-content.modal-medium {
  max-width: 600px;
}

.admin-modal-content.modal-large {
  max-width: 800px;
}

/* Simple Modal (No Header - For Confirmations) */
.admin-modal-content.modal-simple {
  text-align: center;
}

.admin-modal-content.modal-simple .admin-modal-body {
  padding: 3rem 2rem;
}

.admin-modal-content.modal-simple .icon-lg {
  font-size: 3.5rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  display: block;
}

.admin-modal-content.modal-simple h3 {
  margin-bottom: 2rem;
  color: #333;
  font-family: var(--font-ar-heading);
}

/* 5. MOBILE RESPONSIVE (Bottom Nav Edition) */
@media (max-width: 992px) {

  /* Hide Desktop Elements */
  .floating-nano-sidebar {
    display: none !important;
  }

  /* Show Mobile Bottom Nav */
  .bottom-nav {
    display: flex;
  }

  /* Main content full width + bottom padding for Nav */
  .main-wrapper {
    margin-right: 0 !important;
    width: 100% !important;
    padding: 100px 1.25rem 100px 1.25rem !important;
    /* Extra bottom pad */
  }

  /* Header adjustments for small screens */
  .floating-header {
    left: 10px;
    right: 85px;
    /* Logo area space */
  }

  .fixed-logo-area {
    right: 10px;
  }

  .user-pill {
    padding: 0 12px;
  }

  .user-pill .user-name {
    display: none;
    /* Icon/Badge only on mobile */
  }

  .search-pill {
    max-width: none;
    padding: 0 15px;
  }

  /* Overlay when sidebar is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Stats widgets stack vertically */
  .stats-widgets {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
  }

  .dashboard-stat-card {
    flex: none !important;
    width: 100% !important;
    min-width: auto !important;
    max-width: 100% !important;
  }

  /* Hero section responsive */
  .hero-welcome {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .hero-date {
    width: 100%;
    justify-content: center;
  }

  /* Bookings kanban stacks */
  .bookings-kanban {
    flex-direction: column;
  }

  .kanban-column {
    min-width: 100%;
  }

  /* Tables scroll horizontally */
  .data-table-wrapper {
    overflow-x: auto;
  }

  .data-table {
    min-width: 600px;
  }

  /* Forms stack */
  .form-group {
    margin-bottom: 1rem;
  }

  /* Tabs scroll */
  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Hide sidebar toggle button on mobile (use mobile menu toggle instead) */
  .sidebar-toggle-btn {
    display: none;
  }
}

/* Tablet specific adjustments */
@media (max-width: 768px) and (min-width: 577px) {
  .stats-widgets {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }

  .dashboard-stat-card {
    flex: 0 0 calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
    min-width: auto !important;
    max-width: calc(50% - 0.5rem) !important;
  }
}

/* Small mobile phones */
@media (max-width: 576px) {
  .main-wrapper {
    padding: 100px 1rem 100px 1rem !important;
    /* Unified top and bottom padding for floating elements */
  }

  .nano-topbar {
    padding: 0 0.5rem;
  }

  .hero-section h1 {
    font-size: 1.5rem !important;
  }

  .btn {
    font-size: 0.85rem;
    padding: 6px 15px;
  }

  .modal-content {
    width: 95% !important;
    margin: 1rem auto;
  }
}


/* ============================
   6. MODALS
   ============================ */

/* QR Scanner Specific Styles */
.qr-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.qr-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #ddd;
}

.qr-divider span {
  background: #fff;
  padding: 0 15px;
  position: relative;
  color: #888;
  font-size: 0.9rem;
  font-weight: 600;
}

.qr-manual-input {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

#qr-reader {
  border: 2px dashed var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

#qr-reader video {
  border-radius: 10px;
  width: 100%;
  display: block;
}

#qr-reader__dashboard {
  text-align: center !important;
}

/* ============================
   صفحة حسابي (Profile Page)
   ============================ */

.profile-card {
  max-width: 1000px;
  margin: 0 auto 2rem;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;

}

.profile-panel {
  font-family: var(--font-ar-primary);
  background: #faf7f7;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);

}

.profile-panel h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--font-ar-heading);
  font-size: 1.05rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-panel h3 i {
  font-size: 1.1rem;
}

/* توزيع حقول كلمة المرور في عمودين على الشاشات الواسعة */
.profile-two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

/* زر الحفظ في الأسفل على اليمين */
.profile-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-ar-heading);
}

.profile-actions .btn {
  min-width: 180px;
}

/* رسائل النجاح/الخطأ داخل بطاقة حسابي */
.profile-card .success-message,
.profile-card .error-message {
  margin-bottom: 1rem;
  font-family: var(--font-ar-heading);
}

/* استجابة للأجهزة اللوحية والموبايل */
@media (max-width: 992px) {
  .profile-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 576px) {
  .profile-card {
    padding: 1rem;
  }
}

/* ============================
   6. صفحة تسجيل الدخول (LOGIN PAGE)
   ============================ */
.login-body {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ar-primary);
  padding: 20px;
}

.login-container {
  background: var(--card-color);
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.login-container .logo {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-ar-heading);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-container .logo i {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-container p {
  color: var(--muted-color);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.login-container .form-group {
  text-align: right;
  margin-bottom: 1.5rem;
  position: relative;
}

.login-container .form-group label {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.login-container .form-group input {
  padding: 14px 14px 14px 45px;
  /* مساحة للأيقونة */
  background: #f8f9fa;
  border: 1px solid #eee;
  transition: .3s;
}

.login-container .form-group input:focus {
  background: #fff;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(194, 174, 109, 0.15);
}

.login-container .form-group i {
  position: absolute;
  left: 15px;
  top: 42px;
  /* adjust based on label height */
  color: var(--muted-color);
  transition: .3s;
}

.login-container .form-group input:focus+i,
.login-container .form-group:focus-within i {
  color: var(--secondary-color);
}

.login-container .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1.1rem;
  margin-top: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(74, 0, 42, 0.2);
  transition: .3s;
}

.login-container .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 0, 42, 0.3);
}

.error-message {
  background: #fff5f5;
  color: #e74c3c;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid #fed7d7;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

/* === TICKET PREVIEW MODAL === */
.ticket-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.ticket-preview-card {
  background: white;
  border-radius: 20px;
  max-width: 500px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ticket-preview-header {
  background: linear-gradient(135deg, #4A002A 0%, #6D0040 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.ticket-preview-header h2 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.ticket-preview-header p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.ticket-preview-body {
  padding: 24px;
  text-align: center;
}

.queue-number-display {
  font-size: 4rem;
  font-weight: 900;
  color: #4A002A;
  margin: 16px 0;
  text-align: center;
  border: 4px solid #4A002A;
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
  box-shadow: 0 4px 12px rgba(74, 0, 42, 0.15);
  letter-spacing: 3px;
}

.ticket-client-info h3 {
  margin: 12px 0 6px 0;
  font-size: 1.3rem;
  color: #333;
}

.ticket-client-info p {
  margin: 0 0 16px 0;
  color: #666;
  font-size: 1rem;
}

.ticket-qr-container {
  margin: 20px auto;
  padding: 12px;
  background: white;
  border: 2px solid #E5E5E5;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ticket-time-info {
  font-size: 0.9rem;
  color: #888;
  margin: 12px 0;
}

.ticket-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.ticket-actions button {
  flex: 1;
  padding: 16px 24px;
  font-size: 1.1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-print {
  background: linear-gradient(135deg, #4A002A 0%, #6D0040 100%);
  color: white;
}

.btn-print:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 0, 42, 0.3);
}

.btn-cancel-ticket {
  background: #f5f5f5;
  color: #666;
}

.btn-cancel-ticket:hover {
  background: #e5e5e5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .queue-number-display {
    font-size: 4rem;
    padding: 20px;
  }

  .ticket-preview-body {
    padding: 24px;
  }

  .ticket-actions {
    flex-direction: column;
  }
}

/* Fixed Button Outline for Modals */
.btn-outline {
  background: #fff;
  color: #333 !important;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}


/* ============================
   7. GLOBAL RESPONSIVE FIXES (CRITICAL)
   ============================ */
@media (max-width: 768px) {

  /* Fix Content Area Padding */
  .main-wrapper {
    padding: 90px 15px 30px 15px !important;
    /* Reclaim horizontal space */
  }

  /* Fix Header Positioning */
  .floating-header {
    right: 60px;
    /* Make space for logo */
    left: 10px;
  }

  .fixed-logo-area {
    right: 15px;
  }

  /* Fix Nano Sidebar Position */
  .floating-nano-sidebar {
    right: 10px;
  }

  /* General Card Padding Fix */
  .card {
    padding: 15px !important;
  }
}

/* Ensure SweetAlert2 is always on top of modals */
.swal2-container {
  z-index: 10000 !important;
}

/* DARK MODE SUPPORT (Expert Calibration) */
body.dark-mode {
  /* 1. Surface System (Material Design Elevation) */
  /* المستوى 0: الخلفية العميقة */
  --bg-color: #121212;
  /* المستوى 1: البطاقات والقوائم الجانبية (أفتح قليلاً) */
  --card-color: #1E1E1E;
  /* المستوى 2: القوائم المنبثقة والنوافذ (أفتح أكثر للتمييز) */
  --surface-elevated: #2D2D2D;

  /* 2. Brand Colors (Adjusted for Dark Contrast) */
  /* الذهبي: تم تفتيحه وزيادة تشبعه ليبرز بوضوح على الخلفية الداكنة */
  --primary-color: #D4AF37;
  /* العنابي: تم تفتيحه ليتحول إلى لون "ياقوتي" مرئي، لأن العنابي الأصلي يختفي في الظلام */
  --secondary-color: #880E4F;

  --primary-dark: #C5A028;
  /* Hover state for primary */
  --secondary-dark: #6A0B3D;
  /* Hover state for secondary */

  /* 3. Typography & Readability (Eye Comfort) */
  /* ليس أبيض ناصعاً (يؤذي العين) بل رمادي فاتح جداً */
  --text-color: #E0E0E0;
  /* النصوص الثانوية: رمادي متوسط */
  --muted-color: #A0A0A0;

  /* 4. Borders & Separators (Subtle Lighting) */
  /* حدود شبه شفافة بيضاء لتعطي إيحاء بالإضاءة الخافتة بدلاً من الرمادي المصمت */
  --border-color: rgba(255, 255, 255, 0.12);

  /* 5. Shadows (Depth perception) */
  /* في الوضع الليلي، الظلال أقل أهمية من الحدود، لكن نستخدمها للعمق */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.7);
}

body.dark-mode .sidebar {
  background: var(--card-color);
  border-left: 1px solid var(--border-color);
  box-shadow: none;
}

body.dark-mode .card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .header-circle-action {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

body.dark-mode .header-circle-action:hover {
  background-color: var(--primary-color);
  color: #121212;
  border-color: var(--primary-color);
}

body.dark-mode .floating-header {
  background-color: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

body.dark-mode input:focus,
body.dark-mode select:focus {
  border-color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.3);
  outline: none;
}
/* Dark Mode Component Fixes (Search Pill) */
body.dark-mode .search-pill,
body.dark-mode .user-pill {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}
body.dark-mode .search-pill input {
    color: var(--text-color);
    caret-color: var(--primary-color);
}
body.dark-mode .search-dropdown {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
}
body.dark-mode .search-result-item {
    border-bottom-color: var(--border-color);
}
body.dark-mode .search-result-item:hover {
    background: rgba(255,255,255,0.05);
}
body.dark-mode .search-result-item strong {
    color: var(--text-color);
}

