/* WooWhats Custom Styles */

:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --navy-card: #1a2744;
  --blue-primary: #3b82f6;
  --blue-hover: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --gray-text: #94a3b8;
}

body {
  background-color: var(--navy);
  color: #f1f5f9;
  font-family: 'Rubik', sans-serif;
  direction: rtl;
}

/* Sidebar */
.sidebar {
  background-color: var(--navy-light);
  border-left: 1px solid #334155;
  width: 260px;
  min-height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-hidden {
  transform: translateX(260px);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(260px);
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
  .main-content {
    margin-right: 0 !important;
  }
}

.main-content {
  margin-right: 260px;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--gray-text);
  transition: all 0.2s;
  font-size: 0.9rem;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
}

.nav-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: #f1f5f9;
}

.nav-item.nav-active {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--blue-primary);
  font-weight: 600;
}

/* Cards */
.card-dark {
  background-color: var(--navy-light);
}

.card-blue {
  background: linear-gradient(135deg, #1e3a5f, #1e293b);
}

/* KPI Cards */
.kpi-card {
  background-color: var(--navy-light);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
}

/* Buttons */
.btn-primary {
  background-color: var(--blue-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
  font-family: 'Rubik', sans-serif;
}

.btn-primary:hover { background-color: var(--blue-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Rubik', sans-serif;
  transition: all 0.2s;
}

.btn-xs {
  padding: 4px 10px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'Rubik', sans-serif;
  transition: all 0.2s;
}

.btn-blue { background-color: var(--blue-primary); color: white; }
.btn-blue:hover { background-color: var(--blue-hover); }

.btn-gray { background-color: #334155; color: #cbd5e1; }
.btn-gray:hover { background-color: #475569; }

.btn-red { background-color: #7f1d1d; color: #fca5a5; }
.btn-red:hover { background-color: #991b1b; }

.btn-outline {
  background-color: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}
.btn-outline:hover { border-color: var(--blue-primary); color: var(--blue-primary); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green { background-color: #14532d; color: #4ade80; }
.badge-gray { background-color: #1e293b; color: #94a3b8; border: 1px solid #334155; }
.badge-red { background-color: #7f1d1d; color: #fca5a5; }
.badge-blue { background-color: #1e3a5f; color: #60a5fa; }

/* Form inputs */
.form-input {
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #f1f5f9;
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  font-family: 'Rubik', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-primary);
}

.form-input::placeholder { color: #475569; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background-color: var(--navy-light);
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .toggle-slider { background-color: var(--blue-primary); }
input:checked + .toggle-slider:before { transform: translateX(-20px); }
input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.toast-base {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.toast-success { background-color: #14532d; color: #4ade80; border: 1px solid #16a34a; }
.toast-error { background-color: #7f1d1d; color: #fca5a5; border: 1px solid #b91c1c; }

/* Table rows */
.hover\:bg-gray-750:hover { background-color: rgba(30, 41, 59, 0.5); }

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tab */
.tab-btn {
  padding: 10px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--gray-text);
  font-weight: 500;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Rubik', sans-serif;
  font-size: 0.95rem;
}

.tab-btn.tab-active {
  border-bottom-color: var(--blue-primary);
  color: var(--blue-primary);
}

/* Plan cards */
.plan-card {
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
}

.plan-card.plan-active {
  border-color: var(--blue-primary);
  background: rgba(59, 130, 246, 0.05);
}

/* Usage bar */
.usage-bar-bg {
  background-color: #334155;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.usage-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
