/* InstaSend Custom Sidebar & UI Styles */

/* ── Sidebar Navigation ───────────────────────────────── */

/* Hover effect for all nav items */
nav .app-nav .main-nav > li:not(.menu-title) > a:hover {
  background: rgba(var(--primary), 0.08);
  color: rgba(var(--primary), 1);
  transition: all 0.2s ease;
}

/* Active state for top-level items */
nav .app-nav .main-nav > li:not(.menu-title).active > a {
  background: rgba(var(--primary), 0.12);
  color: rgba(var(--primary), 1);
  font-weight: 600;
  border-left: 3px solid rgba(var(--primary), 1);
  padding-left: calc(1rem - 3px);
}

/* Active state icon color */
nav .app-nav .main-nav > li:not(.menu-title).active > a i {
  color: rgba(var(--primary), 1);
}

/* Hover icon color */
nav .app-nav .main-nav > li:not(.menu-title) > a:hover i {
  color: rgba(var(--primary), 1);
}

/* Submenu active state */
nav .app-nav .main-nav > li:not(.menu-title) ul li.active a {
  color: rgba(var(--primary), 1);
  font-weight: 600;
}

/* Submenu hover */
nav .app-nav .main-nav > li:not(.menu-title) ul li a:hover {
  color: rgba(var(--primary), 1);
}

/* WhatsApp submenu expand icon */
nav .app-nav .main-nav > li:not(.menu-title):not(.no-sub) > a .submenu-arrow {
  transition: transform 0.2s ease;
  margin-left: auto;
  font-size: 14px;
}

nav .app-nav .main-nav > li:not(.menu-title):not(.no-sub).open > a .submenu-arrow {
  transform: rotate(90deg);
}

/* Menu title styling */
nav .app-nav .main-nav > li.menu-title span {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(var(--secondary), 0.7);
}

/* ── Smooth transitions ───────────────────────────────── */
nav .app-nav .main-nav > li:not(.menu-title) > a {
  transition: all 0.2s ease;
}

/* ── Card improvements ────────────────────────────────── */
.card {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

/* ── Table improvements ───────────────────────────────── */
.table > thead > tr > th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(var(--secondary), 0.8);
  border-bottom-width: 2px;
}

.table > tbody > tr {
  transition: background-color 0.15s ease;
}

/* ── Badge improvements ───────────────────────────────── */
.badge {
  font-weight: 500;
}

/* ── Button xs size ───────────────────────────────────── */
.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 12px;
  line-height: 1.4;
}

/* ── Empty state styling ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state i {
  font-size: 48px;
  color: rgba(var(--secondary), 0.3);
  display: block;
  margin-bottom: 1rem;
}

.empty-state h5 {
  color: rgba(var(--dark), 0.6);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: rgba(var(--secondary), 0.6);
  margin-bottom: 1.5rem;
}

/* ── Timeline/Flow builder for automations ────────────── */
.flow-timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.flow-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(var(--primary), 0.15);
}

.flow-step {
  position: relative;
  padding-left: 60px;
  padding-bottom: 24px;
}

.flow-step:last-child {
  padding-bottom: 0;
}

.flow-step-icon {
  position: absolute;
  left: 10px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1;
}

.flow-step-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.flow-step-card:hover {
  border-color: rgba(var(--primary), 0.3);
  box-shadow: 0 2px 8px rgba(var(--primary), 0.1);
}

.flow-add-btn {
  position: relative;
  padding-left: 60px;
  padding-bottom: 24px;
}

.flow-add-btn .flow-step-icon {
  background: rgba(var(--primary), 0.1);
  color: rgba(var(--primary), 1);
  border: 2px dashed rgba(var(--primary), 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.flow-add-btn .flow-step-icon:hover {
  background: rgba(var(--primary), 0.2);
  border-color: rgba(var(--primary), 0.5);
}

/* ── WhatsApp preview bubble ──────────────────────────── */
.wa-preview {
  background: #e5ddd5;
  border-radius: 12px;
  padding: 20px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cdc5' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.wa-bubble {
  background: #dcf8c6;
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 90%;
  margin-left: auto;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-bubble-time {
  text-align: right;
  margin-top: 4px;
  color: #999;
  font-size: 11px;
}

/* ── Stat cards ───────────────────────────────────────── */
.stat-card {
  border-radius: 12px;
  padding: 1.25rem;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ── Page header ──────────────────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h3 {
  margin-bottom: 0.25rem;
}

.page-header .page-subtitle {
  color: rgba(var(--secondary), 0.7);
  font-size: 14px;
  margin-bottom: 0;
}
