/* ===== CSS Variables ===== */
:root {
  --animation-duration-fast: 0.3s;
  --animation-duration-normal: 0.5s;
  --animation-duration-slow: 0.8s;
  --primary-color: #ff7b00;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
}

/* ===== 1. Foundation Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInLeft {
  from {
    transform: translate3d(-100%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInTop {
  from {
    transform: translate3d(0, -100%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInBottom {
  from {
    transform: translate3d(0, 100%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  50% {
    opacity: 1;
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
  }
  50% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  to {
    opacity: 0;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn var(--animation-duration-normal);
}

.fade-out {
  animation: fadeOut var(--animation-duration-normal);
}

.fade-in-up {
  animation: fadeInUp var(--animation-duration-normal);
}

.fade-in-down {
  animation: fadeInDown var(--animation-duration-normal);
}

.fade-in-left {
  animation: fadeInLeft var(--animation-duration-normal);
}

.fade-in-right {
  animation: fadeInRight var(--animation-duration-normal);
}

.slide-in-left {
  animation: slideInLeft var(--animation-duration-normal);
}

.slide-in-right {
  animation: slideInRight var(--animation-duration-normal);
}

.slide-in-top {
  animation: slideInTop var(--animation-duration-normal);
}

.slide-in-bottom {
  animation: slideInBottom var(--animation-duration-normal);
}

.zoom-in {
  animation: zoomIn var(--animation-duration-normal);
}

.zoom-out {
  animation: zoomOut var(--animation-duration-normal);
}

.scale-in {
  animation: scaleIn var(--animation-duration-normal);
}

.scale-out {
  animation: scaleOut var(--animation-duration-normal);
}

/* Duration Variations */
.animate-fast {
  animation-duration: var(--animation-duration-fast);
}

.animate-normal {
  animation-duration: var(--animation-duration-normal);
}

.animate-slow {
  animation-duration: var(--animation-duration-slow);
}

/* Delay Classes */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.delay-900 {
  animation-delay: 0.9s;
}

.delay-1000 {
  animation-delay: 1s;
}

/* ===== 2. Sidebar & Navigation Animations ===== */
@keyframes sidebarSlideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes menuItemHover {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes activeMenuGlow {
  0% {
    box-shadow: 0 0 5px rgba(255, 123, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 123, 0, 0.5);
  }
}

@keyframes collapseExpand {
  from {
    width: 60px;
  }
  to {
    width: 250px;
  }
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes iconBounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

/* Sidebar Animation Classes */
.sidebar {
  animation: sidebarSlideIn 0.5s ease-out;
}

.sidebar-menu li a:hover {
  animation: menuItemHover 0.5s ease;
}

.sidebar-menu li.active {
  animation: activeMenuGlow 2s infinite;
}

.sidebar-menu li a i {
  transition: transform 0.3s ease;
}

.sidebar-menu li a:hover i {
  animation: iconBounce 0.5s ease;
}

/* ===== 3. Cards & Stats Animations ===== */
@keyframes cardLift {
  from {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  to {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  }
}

@keyframes cardPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cardFlip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  50% {
    transform: perspective(400px) rotateY(180deg);
  }
  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

@keyframes counterUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Cards Animation Classes */
.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  animation: cardLift 0.3s ease forwards;
}

.stat-card.pulse {
  animation: cardPulse 2s infinite;
}

.stat-card.flip {
  animation: cardFlip 1s;
}

.stat-card h3 {
  animation: counterUp 0.5s ease;
}

.stat-card i {
  transition: transform 0.3s ease;
}

.stat-card:hover i {
  animation: iconSpin 1s ease;
}

/* ===== 4. Tables & Rows Animations ===== */
@keyframes rowHighlight {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(255, 123, 0, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes rowExpand {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

@keyframes rowDelete {
  from {
    opacity: 1;
    max-height: 100px;
  }
  to {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
  }
}

@keyframes rowBlink {
  0%, 50%, 100% {
    opacity: 1;
  }
  25%, 75% {
    opacity: 0.5;
  }
}

/* Tables Animation Classes */
tr.new-row {
  animation: rowHighlight 2s ease;
}

tr.expanded {
  animation: rowExpand 0.5s ease forwards;
}

tr.deleting {
  animation: rowDelete 0.5s ease forwards;
}

tr.status-changing {
  animation: rowBlink 1s ease;
}

/* ===== 5. Forms & Inputs Animations ===== */
@keyframes inputFocusGlow {
  0% {
    box-shadow: 0 0 0 rgba(255, 123, 0, 0);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 123, 0, 0.5);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 123, 0, 0);
  }
}

@keyframes formShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes submitSuccess {
  0% {
    background-color: var(--primary-color);
  }
  50% {
    background-color: var(--success-color);
    transform: scale(1.1);
  }
  100% {
    background-color: var(--success-color);
    transform: scale(1);
  }
}

@keyframes submitLoading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Forms Animation Classes */
input:focus, select:focus, textarea:focus {
  animation: inputFocusGlow 1s ease;
}

.form-error {
  animation: formShake 0.5s ease;
}

.btn-success {
  animation: submitSuccess 0.5s ease forwards;
}

.btn-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid transparent;
  border-radius: 50%;
  border-top-color: currentColor;
  animation: submitLoading 1s linear infinite;
}

/* ===== 6. Modals & Popups Animations ===== */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
}

@keyframes popupDrop {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  80% {
    transform: translateY(10%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastSlide {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  80% {
    transform: translateX(-5%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Modals Animation Classes */
.modal {
  animation: modalFadeIn 0.3s ease;
}

.modal.closing {
  animation: modalFadeOut 0.3s ease forwards;
}

.popup-notification {
  animation: popupDrop 0.5s ease;
}

.toast-notification {
  animation: toastSlide 0.5s ease;
}

/* ===== 7. Status Animations (Orders) ===== */
@keyframes statusNewBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes statusPreparingSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes statusOnWayShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@keyframes statusDeliveredCheck {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes statusCancelledX {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Status Animation Classes */
.status-new {
  animation: statusNewBlink 2s infinite;
}

.status-preparing i {
  animation: statusPreparingSpin 2s infinite linear;
}

.status-onway i {
  animation: statusOnWayShake 1s infinite;
}

.status-delivered .checkmark {
  animation: statusDeliveredCheck 0.5s ease forwards;
}

.status-cancelled .x-mark {
  animation: statusCancelledX 0.5s ease forwards;
}

/* ===== 8. Charts & Reports Animations ===== */
@keyframes barGrow {
  from {
    transform: scaleY(0);
    transform-origin: bottom;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@keyframes lineDraw {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pieRotate {
  from {
    transform: rotate(0deg);
    opacity: 0;
  }
  to {
    transform: rotate(360deg);
    opacity: 1;
  }
}

@keyframes chartHoverPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Charts Animation Classes */
.bar-chart .bar {
  animation: barGrow 1s ease forwards;
  transform: scaleY(0);
}

.line-chart path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: lineDraw 2s ease forwards;
}

.pie-chart {
  animation: pieRotate 1s ease forwards;
}

.chart-element:hover {
  animation: chartHoverPulse 0.3s ease;
}

/* ===== 9. Micro Interactions (UX details) ===== */
@keyframes buttonRipple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes iconHoverBounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -5px, 0);
  }
  70% {
    transform: translate3d(0, -3px, 0);
  }
  90% {
    transform: translate3d(0, -1px, 0);
  }
}

@keyframes linkUnderlineSlide {
  from {
    transform: scaleX(0);
    transform-origin: right;
  }
  to {
    transform: scaleX(1);
    transform-origin: right;
  }
}

@keyframes progressPulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Micro Interactions Classes */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  animation: buttonRipple 0.6s linear;
}

.icon-hover:hover {
  animation: iconHoverBounce 0.5s ease;
}

.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.link-underline:hover::after {
  animation: linkUnderlineSlide 0.3s ease forwards;
}

.progress-bar.pulse {
  animation: progressPulse 1.5s infinite;
}

/* ===== 10. Utility Animations (Helpers) ===== */
.delay-1s {
  animation-delay: 1s;
}

.delay-2s {
  animation-delay: 2s;
}

.delay-3s {
  animation-delay: 3s;
}

.fast {
  animation-duration: var(--animation-duration-fast);
}

.normal {
  animation-duration: var(--animation-duration-normal);
}

.slow {
  animation-duration: var(--animation-duration-slow);
}

.infinite-loop {
  animation-iteration-count: infinite;
}

.once {
  animation-iteration-count: 1;
}

.alternate {
  animation-direction: alternate;
}

.paused {
  animation-play-state: paused;
}

.running {
  animation-play-state: running;
}

/* Responsive adjustments for animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles - disable animations */
@media print {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* ===== CSS Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #f5f7f9;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Login Page Styles ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #ff7b00 0%, #ff5500 100%);
  padding: 20px;
}

.login-form {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  animation: fadeInUp 0.5s ease;
}

.login-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: #ff7b00;
  box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
  outline: none;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: #ff7b00;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: #ff5500;
  transform: translateY(-2px);
}

.error-message {
  color: #dc3545;
  margin-top: 15px;
  text-align: center;
  display: none;
}

/* ===== Dashboard Layout ===== */
.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: linear-gradient(to bottom, #2c3e50, #34495e);
  color: white;
  padding: 20px 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.sidebar-header h2 {
  font-size: 18px;
  margin-bottom: 5px;
}

.sidebar-header p {
  font-size: 12px;
  opacity: 0.7;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding-right: 25px;
}

.sidebar-menu a i {
  margin-left: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-menu li.active a {
  background-color: rgba(255, 123, 0, 0.2);
  color: white;
  border-right: 3px solid #ff7b00;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.header h1 {
  color: #2c3e50;
  font-size: 24px;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info span {
  margin-right: 10px;
}

/* ===== Stats Cards ===== */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card i {
  font-size: 30px;
  margin-bottom: 15px;
  color: #ff7b00;
}

.stat-card h3 {
  font-size: 28px;
  margin-bottom: 5px;
  color: #2c3e50;
}

.stat-card p {
  color: #7f8c8d;
  font-size: 14px;
}

/* ===== Filters ===== */
.filters {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view {
  background-color: #ff7b00;
  color: white;
}

.action-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ===== Orders Table ===== */
.orders-table {
  position: relative;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 20px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff7b00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 15px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 700;
  color: #2c3e50;
}

tr:hover {
  background-color: #f8f9fa;
}

/* ===== Status Badges ===== */
.status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-new {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-preparing {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-ready {
  background-color: #e8f5e9;
  color: #388e3c;
}

.status-onway {
  background-color: #e1f5fe;
  color: #0288d1;
}

.status-delivered {
  background-color: #e8f5e9;
  color: #388e3c;
}

.status-cancelled {
  background-color: #ffebee;
  color: #d32f2f;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.page-btn {
  padding: 8px 15px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background: #f5f5f5;
}

.page-btn.active {
  background: #ff7b00;
  color: white;
  border-color: #ff7b00;
}

/* ===== Order Details ===== */
.order-details {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-top: 30px;
  display: none;
}

.detail-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.detail-section h4 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.customer-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item strong {
  color: #7f8c8d;
}

.cart-items {
  width: 100%;
  margin-top: 15px;
}

.cart-items th {
  background-color: #f8f9fa;
  padding: 10px;
}

.cart-items td {
  padding: 10px;
  text-align: center;
}

.detail-actions {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* ===== Reports Section ===== */
.report-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}

.date-filter {
  display: flex;
  gap: 15px;
}

.time-filter {
  display: flex;
  gap: 10px;
}

.time-btn {
  padding: 8px 15px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-btn.active {
  background: #ff7b00;
  color: white;
  border-color: #ff7b00;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.reports-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.report-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.report-card h4 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.detailed-report {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  overflow-x: auto;
}

.insights-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.insight-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.insight-card h4 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.insights-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 15px;
}

/* ===== Menu Management ===== */
.menu-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: #7f8c8d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: #ff7b00;
  border-bottom-color: #ff7b00;
}

.tab-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.categories-list,
.items-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.category-card,
.item-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-info,
.item-info {
  flex: 1;
}

.category-name,
.item-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.category-order,
.item-price {
  font-size: 14px;
  color: #7f8c8d;
}

.item-description {
  font-size: 13px;
  color: #95a5a6;
  margin-top: 5px;
}

.category-actions,
.item-actions {
  display: flex;
  gap: 10px;
}

.items-filter {
  margin-bottom: 20px;
}

/* ===== Modals ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h4 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: static;
  }
  
  .filter-row {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    grid-template-columns: 1fr;
  }
  
  .filter-actions {
    flex-direction: column;
  }
  
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .report-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .date-filter {
    flex-direction: column;
  }
  
  .insights-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .login-form {
    padding: 20px;
  }
  
  .main-content {
    padding: 15px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .categories-list,
  .items-list {
    grid-template-columns: 1fr;
  }
}

/* ===== Animation Integration ===== */
/* سيتم استيراد ملف الأنيميشن المنفصل هنا */
/* أو يمكن دمج محتواه هنا إذا أردت */

/* تطبيق الأنيميشن على العناصر */
.login-form {
  animation: fadeInUp 0.5s ease;
}

.stat-card:hover {
  animation: cardLift 0.3s ease forwards;
}

.sidebar-menu li a:hover {
  animation: menuItemHover 0.5s ease;
}

.sidebar-menu li.active {
  animation: activeMenuGlow 2s infinite;
}

.status-new {
  animation: statusNewBlink 2s infinite;
}

/* ===== Base (Mobile First) ===== */
body {
  font-size: 14px;
  padding: 10px;
}

/* ===== Small Devices (>= 576px) ===== */
@media (min-width: 576px) {
  body {
    font-size: 15px;
    padding: 15px;
  }

  .container {
    padding: 0 15px;
  }
}

/* ===== Medium Devices (>= 768px) ===== */
@media (min-width: 768px) {
  body {
    font-size: 16px;
    padding: 20px;
  }

  .container {
    display: grid;
    grid-template-columns: 200px 1fr; /* Sidebar + Content */
    gap: 20px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

/* ===== Large Devices (>= 992px) ===== */
@media (min-width: 992px) {
  body {
    font-size: 17px;
  }

  .stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Extra Large Devices (>= 1200px) ===== */
@media (min-width: 1200px) {
  body {
    font-size: 18px;
  }

  .stats-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .insights-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Ultra Wide (>= 1600px) ===== */
@media (min-width: 1600px) {
  body {
    font-size: 19px;
    max-width: 1500px;
    margin: 0 auto;
  }
}

/* اجعل الجدول قابل للتحريك على الشاشات الصغيرة */
.orders-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* سحب سلس للموبايل */
}

.orders-table table {
  width: 100%;
  min-width: 700px; /* يمنع الأعمدة من الانكماش */
  border-collapse: collapse;
}

.orders-table th,
.orders-table td {
  padding: 10px;
  white-space: nowrap; /* يمنع تكسير النص */
  text-align: center;
}

/* تحسين المظهر على الموبايل */
@media (max-width: 768px) {
  .orders-table {
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  
  .orders-table table {
    font-size: 14px;
  }
}
.user-info {
  position: relative;
  padding-bottom: 8px;
}

.welcome-line {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ff7b00, #ff5500);
  border-radius: 2px;
  animation: linePulse 2s infinite;
}

@keyframes linePulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

#username-display {
  font-weight: 700;
  color: #ff5500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* الأساسيات */
.items-filter {
  width: 100%;
  max-width: 300px; /* يمكنك تغييره حسب التصميم */
  margin: 20px auto;
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تصميم الـ select */
.items-filter select {
  width: 100%;
  padding: 12px 40px 12px 16px; /* مسافة من اليمين للسهام */
  border-radius: 12px;
  border: 2px solid #ddd;
  background-color: #fff;
  font-size: 16px;
  color: #333;
  appearance: none; /* لإخفاء شكل السهم الافتراضي */
  cursor: pointer;
  transition: all 0.3s ease; /* أنميشن ناعم */
}

/* تأثير عند المرور بالماوس */
.items-filter select:hover {
  border-color: #ff9800;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

/* تأثير عند التركيز */
.items-filter select:focus {
  outline: none;
  border-color: #ff9800;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

/* إضافة سهم مخصص */
.items-filter::after {
  content: "▼";
  font-size: 12px;
  color: #ff9800;
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* دوران السهم عند الفتح (يمكن التحكم عبر JS إذا أردت فتح/غلق) */
.items-filter select:focus + .items-filter::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Responsive لجميع الشاشات */
@media (max-width: 480px) {
  .items-filter {
    max-width: 90%;
  }
  .items-filter select {
    font-size: 14px;
    padding: 10px 36px 10px 14px;
  }
}
