/* ========================================
   Notification Gateway - Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary-50: #ede7f6;
  --primary-100: #d1c4e9;
  --primary-200: #b39ddb;
  --primary-300: #9575cd;
  --primary-400: #7e57c2;
  --primary-500: #6a3de8;
  --primary-600: #5e35b1;
  --primary-700: #512da8;
  --primary-800: #4527a0;
  --primary-900: #311b92;

  --accent-400: #00e5ff;
  --accent-500: #00bcd4;
  --accent-600: #0097a7;

  --success: #00c853;
  --warning: #ffc107;
  --danger: #ff1744;
  --info: #2979ff;

  --bg-primary: #1a1926;
  --bg-secondary: #252545;
  --bg-card: rgba(40, 40, 65, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --bg-glass-hover: rgba(255, 255, 255, 0.12);

  --text-primary: #ffffff;
  --text-secondary: #c2c4db;
  --text-muted: #8e90a6;

  --border-color: rgba(255, 255, 255, 0.12);
  --border-active: rgba(106, 61, 232, 0.6);

  --gradient-primary: linear-gradient(135deg, #6a3de8 0%, #00bcd4 100%);
  --gradient-card: linear-gradient(135deg, rgba(106, 61, 232, 0.15) 0%, rgba(0, 188, 212, 0.1) 100%);
  --gradient-bg: linear-gradient(135deg, #1a1926 0%, #252545 50%, #2a3556 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(106, 61, 232, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: none;
  --transition-fast: none;
}

/* ========== Reset ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ========== Animated Background ========== */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-particles::before,
.bg-particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: none;
}

.bg-particles::before {
  width: 400px;
  height: 400px;
  background: var(--primary-500);
  top: -100px;
  right: -100px;
}

.bg-particles::after {
  width: 350px;
  height: 350px;
  background: var(--accent-500);
  bottom: -100px;
  left: -100px;
  animation-delay: 4s;
  animation-direction: reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ========== Login Page ========== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: none;
}

.login-card .btn-primary {
  width: 100%;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(106, 61, 232, 0.3);
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== Form Elements ========== */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition-fast);
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 14px 44px 14px 14px;
  background: var(--bg-glass);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--primary-500);
  background: rgba(106, 61, 232, 0.05);
  box-shadow: 0 0 0 3px rgba(106, 61, 232, 0.15);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a7a9be' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px 12px;
  appearance: none;
  -webkit-appearance: none;
}

select.form-control option {
  background-color: #0d0d0d !important;
  color: #2d2669 !important;
  padding: 10px;
}

.form-control:focus+.input-icon,
.form-control:focus~.input-icon {
  color: var(--primary-400);
}

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  pointer-events: all;
}

.password-toggle:hover {
  color: var(--primary-400);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(106, 61, 232, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(106, 61, 232, 0.4);
}

.btn-accent {
  background: var(--gradient-primary);
  filter: hue-rotate(180deg);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 188, 212, 0.4);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary-500);
  color: var(--primary-400);
  background: rgba(106, 61, 232, 0.05);
}

/* ========== App Layout ========== */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ========== Top Navbar ========== */
.navbar {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar-brand h2 {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Navbar Menu ========== */
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(106, 61, 232, 0.15);
  color: var(--primary-300);
}

.nav-link.active .nav-icon {
  filter: drop-shadow(0 0 8px var(--primary-500));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.user-badge .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  font-weight: 700;
}

.btn-logout {
  padding: 8px 16px;
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: rgba(255, 23, 68, 0.4);
}

/* ========== Main Content ========== */
.main-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ========== Stats Cards ========== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.sms {
  background: rgba(41, 121, 255, 0.15);
  color: var(--info);
}

.stat-icon.whatsapp {
  background: rgba(0, 200, 83, 0.15);
  color: var(--success);
}

.stat-icon.email {
  background: rgba(106, 61, 232, 0.15);
  color: var(--primary-400);
}

.stat-icon.total {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning);
}

.stat-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ========== Tabs ========== */
.tabs-container {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0 8px;
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}

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

.tab-btn .tab-icon {
  font-size: 1.2rem;
}

.tab-btn .tab-count {
  background: var(--bg-glass);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.tab-btn.active .tab-count {
  background: rgba(106, 61, 232, 0.2);
  color: var(--primary-300);
}

/* ========== Search Bar ========== */
.search-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar {
  padding: 24px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.search-wrapper .form-control {
  padding-right: 44px;
  height: 48px;
}

.search-wrapper .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.btn-search-ui {
  height: 48px;
  padding: 0 32px;
}

#addEmailBtn {
  height: 48px;
  padding: 0 32px;
}


.search-input-wrapper {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input-wrapper .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  background: var(--bg-glass);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(106, 61, 232, 0.15);
}

.btn-search {
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-search:hover {
  box-shadow: 0 4px 16px rgba(106, 61, 232, 0.3);
  transform: translateY(-1px);
}

.btn-clear {
  padding: 12px 20px;
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-clear:hover {
  background: var(--bg-glass-hover);
  border-color: var(--text-muted);
}

/* ========== Table ========== */
.tab-content {
  display: none;
  padding: 0;
}

.tab-content.active {
  display: block;
}

/* ========== Toggle Switch ========== */
.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  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: rgba(255, 255, 255, 0.1);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked+.slider {
  background: var(--gradient-primary);
}

input:checked+.slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

/* ========== Modal ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-card);
  margin: 10% auto;
  padding: 32px;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  animation: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--danger);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.data-table thead th {
  padding: 14px 20px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.15);
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-glass-hover);
}

.data-table tbody td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table tbody td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========== Status Badges ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(0, 200, 83, 0.12);
  color: var(--success);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

.badge-danger {
  background: rgba(255, 23, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 23, 68, 0.2);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.12);
  color: var(--warning);
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.badge-info {
  background: rgba(41, 121, 255, 0.12);
  color: var(--info);
  border: 1px solid rgba(41, 121, 255, 0.2);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ========== Message Preview ========== */
.msg-preview {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.page-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-400);
}

.page-btn.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== Loading Spinner ========== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 12px;
  color: var(--text-muted);
}

/* ========== Alert / Toast ========== */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-error {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.25);
  color: #ff5c7c;
}

.alert-success {
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.25);
  color: #4cdc8c;
}

/* ========== Toast Notifications ========== */
.toast-container {
  position: fixed;
  top: 32px;
  left: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  min-width: 300px;
  animation: none;
}

.toast-success {
  border-right: 4px solid var(--success);
}

.toast-error {
  border-right: 4px solid var(--danger);
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-weight: 600;
  font-size: 0.95rem;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .login-card {
    padding: 36px 24px;
    margin: 16px;
  }

  .navbar {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabs-header {
    overflow-x: auto;
  }

  .tab-btn {
    padding: 14px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-input-wrapper {
    min-width: 100%;
  }

  .btn-search,
  .btn-clear {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .user-badge span:not(.user-avatar) {
    display: none;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }
}

/* WhatsApp Management Sub-tabs */
.whatsapp-management-nav {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.sub-tab-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(100, 108, 255, 0.3);
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
  animation: none;
}

.modal-lg {
  max-width: 800px;
}