body { background: #f4f6f9; font-family: 'Tahoma', 'Cairo', sans-serif; }

.navbar-brand { font-weight: bold; font-size: 1.2rem; }
.card { border-radius: 12px; border: none; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.card-header { border-radius: 12px 12px 0 0 !important; }
.table { background: #fff; border-radius: 10px; overflow: hidden; }
.btn { border-radius: 8px; font-weight: 500; }
h1, h2, h3 { color: #2c3e50; font-weight: 700; }

.login-logo {
  width: 80px; height: 80px; margin: 0 auto;
  background: linear-gradient(135deg, #2c3e50, #3498db);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 40px;
}

.stat-card {
  display: flex; align-items: center; gap: 15px;
  padding: 20px; border-radius: 14px; color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,.1);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { font-size: 38px; opacity: .85; }
.stat-info { flex: 1; }
.stat-label { font-size: 13px; opacity: .9; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 700; }

.bg-gradient-primary  { background: linear-gradient(135deg, #667eea, #764ba2); }
.bg-gradient-success  { background: linear-gradient(135deg, #11998e, #38ef7d); }
.bg-gradient-info     { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.bg-gradient-warning  { background: linear-gradient(135deg, #f2994a, #f2c94c); }

.alert { border-radius: 10px; border: none; }
.form-control, .form-select { border-radius: 8px; }
.table-hover tbody tr:hover { background: #f8f9fa; }
code { background: #eef2f5; padding: 2px 6px; border-radius: 4px; color: #c0392b; }

/* ═══════════════════════════════════════
   أزرار الإجراءات الاحترافية
   ═══════════════════════════════════════ */

.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  color: white;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  color: white;
  text-decoration: none;
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.view       { background: linear-gradient(135deg, #3498db, #2980b9); }
.action-btn.payment    { background: linear-gradient(135deg, #27ae60, #16a085); }
.action-btn.edit-data  { background: linear-gradient(135deg, #f39c12, #e67e22); }
.action-btn.edit-items { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.action-btn.pdf        { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.action-btn.delete     { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }

.action-btn.delete:hover { background: linear-gradient(135deg, #e74c3c, #c0392b); }

/* Tooltip عند التمرير */
.action-btn::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%);
  background: #2c3e50;
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.action-btn::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  right: 50%;
  transform: translateX(50%);
  border: 5px solid transparent;
  border-top-color: #2c3e50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.action-btn:hover::before,
.action-btn:hover::after {
  opacity: 1;
}

/* ────────── خلية الإجراءات ────────── */
.actions-cell {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

/* ────────── Badges ────────── */
.badge-soft-success { background: #d4edda; color: #155724; }
.badge-soft-danger  { background: #f8d7da; color: #721c24; }
.badge-soft-warning { background: #fff3cd; color: #856404; }
.badge-soft-info    { background: #d1ecf1; color: #0c5460; }

/* ═══════════════════════════════════════════════════════
   قائمة الإجراءات المنسدلة (Actions Dropdown)
   ═══════════════════════════════════════════════════════ */

.actions-dropdown {
  position: relative;
  display: inline-block;
}

.actions-dropdown .dropdown-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #34495e, #2c3e50);
  color: white;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.actions-dropdown .dropdown-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #2c3e50, #1a252f);
}

.actions-dropdown .dropdown-toggle::after {
  display: none; /* إخفاء السهم الافتراضي */
}

.actions-dropdown .dropdown-toggle i {
  transition: transform 0.3s;
}

.actions-dropdown.open .dropdown-toggle i {
  transform: rotate(90deg);
}

.actions-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 8px;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.actions-dropdown.open .actions-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.actions-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
}

[dir="ltr"] .actions-dropdown-menu .dropdown-item {
  text-align: left;
}

.actions-dropdown-menu .dropdown-item:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.actions-dropdown-menu .dropdown-item i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
}

.actions-dropdown-menu .dropdown-item.view i       { background: linear-gradient(135deg, #3498db, #2980b9); }
.actions-dropdown-menu .dropdown-item.payment i    { background: linear-gradient(135deg, #27ae60, #16a085); }
.actions-dropdown-menu .dropdown-item.edit-data i  { background: linear-gradient(135deg, #f39c12, #e67e22); }
.actions-dropdown-menu .dropdown-item.edit-items i { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.actions-dropdown-menu .dropdown-item.pdf i        { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.actions-dropdown-menu .dropdown-item.delete i     { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }

.actions-dropdown-menu .dropdown-item.delete:hover {
  background: #fee;
  color: #c0392b;
}

.actions-dropdown-menu .dropdown-divider {
  height: 1px;
  background: #e9ecef;
  margin: 6px 0;
  border: none;
}

.actions-dropdown-menu .dropdown-header {
  font-size: 11px;
  color: #95a5a6;
  text-transform: uppercase;
  padding: 4px 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ─── Table responsiveness ─── */
.actions-cell {
  text-align: center;
  white-space: nowrap;
  width: 70px;
}

/* ─── Animation ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.actions-dropdown.open .actions-dropdown-menu {
  animation: fadeInUp 0.15s ease-out;
}
