* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  direction: rtl;
  text-align: right;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text-primary-current);
  transition: all 0.3s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input, select {
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-on-primary);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--overlay-light);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-content {
  min-height: calc(100vh - 160px);
  padding: 40px 0;
}

/* Login Required Modal */
.login-required-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.login-required-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-required-modal-content {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-required-icon {
  font-size: 64px;
}

.login-required-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary-current);
  text-align: center;
}

.login-required-message {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary-current);
  text-align: center;
}

.login-required-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-primary-current);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  border: 2px solid var(--border-color-current);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Custom Alert/Confirm Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  padding: 20px;
}

.custom-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.custom-modal-content {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
  position: relative;
  overflow: hidden;
}

.custom-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
}

.custom-modal-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  animation: popIn 0.4s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.custom-modal-icon {
  font-size: 36px;
  color: white;
  font-weight: bold;
}

.custom-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary-current);
  text-align: center;
  margin: 0;
}

.custom-modal-message {
  font-size: 16px;
  color: var(--text-secondary-current);
  text-align: center;
  margin: 0;
  line-height: 1.8;
}

.custom-modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.custom-modal-buttons button {
  flex: 1;
}

.btn-danger {
  background: var(--error);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #25D366;
  color: white;
  padding: 14px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 16px;
  z-index: 9999;
  transition: all 0.3s ease;
  overflow: hidden;
}

.whatsapp-float:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
  background-color: #128C7E;
  padding: 14px 24px;
  border-radius: 50px;
}

.whatsapp-float:hover .whatsapp-text {
  display: inline-block;
}

.whatsapp-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.whatsapp-icon {
  width: 28px;
  height: 28px;
}

.whatsapp-text {
  display: none;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 16px;
    left: 16px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 14px;
    left: 14px;
    padding: 10px;
  }

  .whatsapp-float:hover {
    padding: 10px 16px;
  }
}

