/* ═══ SolaRay Web Admin Panel Stylesheet ═══ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Noto+Kufi+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-tertiary: #1e294b;
  --bg-card: rgba(20, 30, 55, 0.6);
  --bg-glass: rgba(15, 23, 42, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #f59e0b; /* Solar Amber */
  --accent-gradient: linear-gradient(135deg, #f59e0b, #eab308);
  --accent-glow: rgba(245, 158, 11, 0.15);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.4);
  
  --font-title: 'Outfit', 'Noto Kufi Arabic', sans-serif;
  --font-body: 'Inter', 'Noto Kufi Arabic', sans-serif;
  
  --sidebar-width: 300px;
  --header-height: 70px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 20px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Login Page Styling */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 40%);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.4));
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

[dir="rtl"] .form-group {
  text-align: right;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input-container {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

[dir="rtl"] .form-input-icon {
  left: auto;
  right: 14px;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px 14px 44px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
  transition: var(--transition);
}

[dir="rtl"] .form-input {
  padding: 14px 44px 14px 14px;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.05);
}

/* Legible Dropdown / Select Option styling for dark mode */
select.form-input {
  cursor: pointer;
  background-color: #131b2e; /* dark theme base */
  color: var(--text-primary);
}

select.form-input option {
  background-color: #131b2e !important; /* dark slate background */
  color: #ffffff !important; /* solid white text */
  padding: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0b0f19;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.error-message {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  text-align: left;
  display: none;
  animation: shake 0.3s ease;
}

[dir="rtl"] .error-message {
  text-align: right;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.dashboard-layout.active {
  opacity: 1;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.3));
}

.sidebar-title {
  font-size: 20px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  gap: 12px;
  position: relative;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.menu-item.active {
  background: var(--bg-tertiary);
  color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

[dir="rtl"] .menu-item.active {
  box-shadow: inset -4px 0 0 var(--accent);
}

.menu-item-icon {
  width: 18px;
  height: 18px;
}

.menu-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

[dir="rtl"] .menu-badge {
  margin-left: 0;
  margin-right: auto;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  width: 300px;
  gap: 8px;
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
}

.header-search input:focus {
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

/* Panel & Tabs Container */
.panel-container {
  flex: 1;
  padding: 32px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.panel-view {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.panel-view.active {
  display: block;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title-group h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-title-group p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: var(--transition);
}

[dir="rtl"] .stat-card::before {
  left: auto;
  right: 0;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-info h3 {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-title);
}

.stat-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card.amber .stat-icon-wrapper { background: var(--accent-glow); color: var(--accent); }
.stat-card.blue .stat-icon-wrapper { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.stat-card.emerald .stat-icon-wrapper { background: var(--success-glow); color: var(--success); }
.stat-card.red .stat-icon-wrapper { background: var(--danger-glow); color: var(--danger); }

/* Quick Actions & Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

/* Charts Wrapper */
.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}

/* Custom Table Design */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

[dir="rtl"] .custom-table {
  text-align: right;
}

.custom-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-active { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-rejected { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-shipped { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.badge-delivered { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-cancelled { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); }

/* Quick Action Links */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-link-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  gap: 10px;
}

.quick-link-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.quick-link-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 24px;
  height: 24px;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Flex Grid Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-full {
  grid-column: span 2;
}

@media (max-width: 600px) {
  .form-full {
    grid-column: span 1;
  }
}

/* Tabs Bar */
.tabs-bar {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* Dynamic Items Manager Layout */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.list-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-focus);
}

.list-item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.list-item-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.list-item-details h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.list-item-details p {
  font-size: 13px;
  color: var(--text-secondary);
}

.list-item-actions {
  display: flex;
  gap: 8px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Notifications layout */
.notifications-editor {
  max-width: 600px;
}

/* Direct Invoice PDF Generator Screen */
.invoice-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .invoice-editor {
    grid-template-columns: 1fr;
  }
}

.invoice-preview-pane {
  position: relative;
  background: white;
  color: #1e293b;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  font-family: 'Inter', sans-serif;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

/* Beautiful stamp styles */
.invoice-stamp-container {
  position: absolute;
  bottom: 90px;
  left: 60px;
  transform: rotate(-12deg);
  z-index: 10;
  pointer-events: none;
}

[dir="rtl"] .invoice-stamp-container {
  left: auto;
  right: 60px;
  transform: rotate(12deg);
}

.invoice-stamp {
  width: 160px;
  height: 95px;
  border: 3px double #1e40af;
  border-radius: 6px;
  color: #1e40af;
  font-family: 'Cairo', 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.05), inset 0 0 0 1px #1e40af;
  padding: 6px;
  text-align: center;
}

.invoice-stamp .stamp-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 2px;
}

.invoice-stamp .stamp-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.invoice-stamp .stamp-date {
  font-size: 9px;
  font-weight: bold;
  background: #1e40af;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 2px;
}

.invoice-stamp .stamp-footer {
  font-size: 8px;
  font-weight: 600;
  opacity: 0.8;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.invoice-logo {
  font-size: 24px;
  font-weight: 800;
  color: #0b0f19;
}

.invoice-title {
  text-align: right;
}

.invoice-title h2 {
  font-size: 28px;
  color: #f59e0b;
}

.invoice-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.invoice-table th {
  background: #f1f5f9;
  padding: 12px;
  font-weight: 600;
  text-align: left;
}

[dir="rtl"] .invoice-table th {
  text-align: right;
}

.invoice-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.invoice-totals {
  margin-left: auto;
  width: 250px;
}

[dir="rtl"] .invoice-totals {
  margin-left: 0;
  margin-right: auto;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.totals-row.grand-total {
  border-top: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 18px;
  color: #f59e0b;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Responsive sidebar */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  [dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Global search panel layout and styling */
.search-results-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 16px;
}

.search-results-area .card {
  border-right: 4px solid var(--accent); /* right-border in RTL */
  transition: transform 0.2s ease;
}

[dir="ltr"] .search-results-area .card {
  border-right: none;
  border-left: 4px solid var(--accent);
}

.search-results-area .card:hover {
  transform: translateX(-3px);
}

[dir="ltr"] .search-results-area .card:hover {
  transform: translateX(3px);
}

.search-results-area .card-title {
  font-size: 16px;
  font-weight: 700;
}

/* Stat card interactive hand cursor */
.stat-card {
  cursor: pointer !important;
}

/* Settings Search Pulse Highlight animation */
@keyframes pulseGlow {
  0%, 100% { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-glow); }
  50% { border-color: var(--accent); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.4); }
}
.pulse-highlight {
  animation: pulseGlow 1s ease-in-out infinite;
}
