/* ==========================================================================
   ClarityOps Client Dashboard — Dedicated Isolated Stylesheet
   ========================================================================== */

/* Resets & Base Variables */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06070f;
  --bg2: #0c0e1a;
  --bg3: #111427;
  --primary: #4f8ef7;
  --primary-glow: rgba(79, 142, 247, 0.15);
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --text: #e8eaf6;
  --text-muted: #8892b0;
  --border: rgba(255, 255, 255, 0.07);
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 12px;
  --radius-lg: 20px;
  --font-family: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Background Animated Blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  animation: blobFloat 15s ease-in-out infinite alternate;
}
.blob-1 { width: 500px; height: 500px; background: #4f8ef7; top: -150px; left: -100px; }
.blob-2 { width: 400px; height: 400px; background: #7c3aed; top: 30%; right: -150px; animation-delay: -5s; }
.blob-3 { width: 350px; height: 350px; background: #06b6d4; bottom: -50px; left: 25%; animation-delay: -10s; }

@keyframes blobFloat {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,50px) scale(1.05); }
}

/* Base Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   Dashboard Layout Structure
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-dash-header {
  display: none;
}

/* Sidebar Navigation */
.dash-sidebar {
  width: 275px;
  background-color: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow-y: auto;
  max-height: 100vh;
}

.sidebar-logo {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: inline-block;
  margin-bottom: 5px;
}
.sidebar-logo span {
  color: var(--primary);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 30px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.925rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}
.sidebar-link.active {
  color: #fff;
  background: var(--primary-glow);
  border-left-color: var(--primary);
  font-weight: 600;
}

.badge-pending {
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.badge-pending {
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}
.sidebar-icon {
  font-size: 1.1rem;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* Main Panel area */
.dash-main {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  min-width: 0; /* Prevents flex items from overflowing horizontal space */
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

/* Inner header */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.dash-title h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}
.dash-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Niche Selector */
.niche-selector {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 8px;
  gap: 2px;
}
.niche-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.825rem;
  transition: all 0.2s;
  font-family: var(--font-family);
}
.niche-btn:hover {
  color: #fff;
}
.niche-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Tab Content Area
   ========================================================================== */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Fade in Tab Animation helper class */
.fade-in-tab {
  animation: tabEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes tabEntrance {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Overview Components
   ========================================================================== */

/* Metrics grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.dash-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.dash-card:hover {
  border-color: rgba(79, 142, 247, 0.3);
  transform: translateY(-2px);
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-card-value {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 800;
  margin-top: 10px;
  color: #fff;
  transition: opacity 0.15s ease;
}
.dash-card-change {
  font-size: 0.8rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-card-change.up { color: #10b981; }
.dash-card-change.down { color: #ef4444; }

/* Grid Sections (Chart + Activity list) */
.dash-sections {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 25px;
}

.dash-section-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.dash-section-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Charts styling */
.dash-chart-container {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  gap: 10px;
}
.chart-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
}
.chart-bar {
  width: 100%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(79, 142, 247, 0.1));
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}
.chart-bar.accent-bar {
  background: linear-gradient(180deg, var(--accent), rgba(124, 58, 237, 0.1));
}
.chart-bar:hover {
  filter: brightness(1.2);
}
.chart-bar:hover::before {
  content: attr(data-value);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 15, 25, 0.95);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.chart-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Activity Items */
.recent-leads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.15s ease;
}
.lead-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.lead-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.lead-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.lead-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.lead-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.lead-status.resolved {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

/* ==========================================================================
   Shared Banner Layout
   ========================================================================== */
.status-banner {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-indicator-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGreen 2.2s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.status-text h4 {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}
.status-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.status-metrics {
  display: flex;
  gap: 20px;
}
.status-metric-item {
  text-align: right;
}
.status-metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-metric-val {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   WhatsApp Tab Components
   ========================================================================== */
.whatsapp-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 25px;
}

/* Config forms styling */
.config-group {
  margin-bottom: 18px;
}
.config-row-layout {
  display: flex;
  gap: 16px;
}
.config-col-model {
  flex: 1.2;
}
.config-col-temp {
  flex: 0.8;
}
.config-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.config-input, .config-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  outline: none;
}
.config-input:focus, .config-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
  background: rgba(255, 255, 255, 0.01);
}
.config-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.btn-save-config {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  font-family: var(--font-family);
}
.btn-save-config:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* WhatsApp Simulator Card */
.wa-sim-card {
  background: #0f141f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 500px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.wa-sim-header {
  background: #202c33;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.wa-sim-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-sim-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.wa-sim-contact-info h4 {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
}
.wa-sim-contact-info p {
  font-size: 0.7rem;
  color: #10b981;
  margin-top: 1px;
}
.wa-sim-actions {
  display: flex;
  gap: 14px;
  color: var(--text-muted);
  cursor: default;
  font-size: 1rem;
}

.wa-sim-body {
  flex-grow: 1;
  background-color: #0b0f19;
  background-image: radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-sim-msg {
  max-width: 80%;
  padding: 8px 12px 18px 12px;
  border-radius: 8px;
  font-size: 0.825rem;
  line-height: 1.4;
  color: #fff;
  position: relative;
  word-break: break-word;
}
.wa-sim-msg-in {
  background: #202c33;
  align-self: flex-start;
  border-top-left-radius: 0;
}
.wa-sim-msg-out {
  background: #005c4b;
  align-self: flex-end;
  border-top-right-radius: 0;
}
.wa-sim-msg-time {
  position: absolute;
  bottom: 2px;
  right: 6px;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Typing indicator */
.wa-sim-typing {
  align-self: flex-start;
  background: #202c33;
  padding: 8px 14px;
  border-radius: 8px;
  border-top-left-radius: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.wa-sim-typing-dot {
  width: 5px;
  height: 5px;
  background: #8696a0;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.wa-sim-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.wa-sim-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}

.wa-sim-footer {
  background: #1f2c34;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-sim-input-wrap {
  flex-grow: 1;
}
.wa-sim-input {
  width: 100%;
  background: #2a3942;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff;
  font-size: 0.825rem;
  outline: none;
  font-family: var(--font-family);
}
.wa-sim-send {
  background: #00a884;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 0.9rem;
  transition: background 0.2s;
  flex-shrink: 0;
}
.wa-sim-send:hover {
  background: #008f72;
}

/* ==========================================================================
   Google Maps Reviews Tab Components
   ========================================================================== */
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 15px;
}

.review-card-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.review-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.review-meta h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.review-meta span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.review-rating {
  color: #ffb400;
  font-size: 0.9rem;
}
.review-comment {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.review-reply-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.review-reply-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.review-reply-btn {
  background: none;
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  font-family: var(--font-family);
}
.review-reply-btn:hover {
  background: rgba(16, 185, 129, 0.04);
}
.review-reply-textarea {
  width: 100%;
  background: #090b14;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  color: #fff;
  font-size: 0.78rem;
  resize: vertical;
  min-height: 65px;
  line-height: 1.4;
  box-sizing: border-box;
  font-family: var(--font-family);
}
.review-reply-textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.review-reply-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.btn-reply-send {
  background: #10b981;
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font-family);
}
.btn-reply-send:hover {
  background: #059669;
}

/* ==========================================================================
   Calendar Scheduler Tab Components
   ========================================================================== */
.calendar-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-top: 15px;
  width: 100%;
  max-width: 100%;
}
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}
.calendar-table th, .calendar-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.825rem;
}
.calendar-table th {
  background: rgba(255, 255, 255, 0.015);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}
.calendar-table tr:hover td {
  background: rgba(255, 255, 255, 0.005);
}
.calendar-table tr:last-child td {
  border-bottom: none;
}
.client-info-td {
  display: flex;
  align-items: center;
  gap: 8px;
}
.client-avatar-s {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
}
.status-badge-cal {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.status-badge-cal.active { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.status-badge-cal.pending { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.status-badge-cal.sent { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.btn-action-s {
  background: none;
  border: 1px solid var(--border);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family);
}
.btn-action-s:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
}
.btn-action-s.primary-s {
  background: var(--primary-glow);
  border-color: rgba(79, 142, 247, 0.2);
  color: var(--primary);
}
.btn-action-s.primary-s:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Toast Success Notifications
   ========================================================================== */
.toast-success {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}
.toast-success.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive / Media Queries for Layout Stability
   ========================================================================== */

@media (max-width: 992px) {
  .dash-sections {
    grid-template-columns: 1fr;
  }
  .whatsapp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Restructuring layout to be column-based */
  .dashboard-layout {
    flex-direction: column;
    padding-top: 60px; /* Offset for fixed top mobile header */
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }

  .config-row-layout {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .config-col-model, .config-col-temp {
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  /* Showing mobile top bar header */
  .mobile-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    z-index: 150;
  }
  .mobile-dash-logo {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
  }
  .mobile-dash-logo span {
    color: var(--primary);
  }
  
  .mobile-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Transform sidebar into responsive slide-out drawer */
  .dash-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: -260px; /* Drawer initially hidden */
    height: calc(100vh - 60px);
    width: 260px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 140;
    gap: 30px;
  }
  .dash-sidebar.open {
    left: 0;
  }

  /* Resizing main workspace */
  .dash-main {
    padding: 24px 16px;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .dash-header {
    margin-bottom: 25px;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .niche-selector {
    width: 100%;
    justify-content: space-between;
  }
  .niche-btn {
    flex-grow: 1;
    text-align: center;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .status-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .status-metrics {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .status-metric-item {
    text-align: left;
  }
  .dash-title h1 {
    font-size: 1.5rem;
  }
  .dash-title p {
    font-size: 0.825rem;
  }
  .niche-selector {
    gap: 4px;
  }
  .niche-btn {
    padding: 8px 6px;
    font-size: 0.75rem;
    flex-grow: 1;
  }
  .dash-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dash-card {
    padding: 16px;
  }
  .dash-card-value {
    font-size: 1.6rem;
  }
  .dash-chart-container {
    gap: 4px;
  }
  .chart-bar {
    max-width: 24px;
  }
  .chart-label {
    font-size: 0.65rem;
  }
  .review-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .review-rating {
    align-self: flex-start;
  }
  .review-reply-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ==========================================================================
   NOVA REPAGINAÇÃO: Categorias da Sidebar & Modo Colapsável
   ========================================================================== */
.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0.65;
  margin: 18px 12px 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-section-title:first-of-type {
  margin-top: 10px;
}

.badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.63rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.sidebar-collapse-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-collapse-btn:hover {
  background: var(--primary-glow);
  color: #fff;
  border-color: var(--primary);
}

/* Modo Colapsado Mini Sidebar */
.dash-sidebar.collapsed {
  width: 78px;
  padding: 24px 10px;
}
.dash-sidebar.collapsed .sidebar-section-title,
.dash-sidebar.collapsed .sidebar-link span:not(.sidebar-icon),
.dash-sidebar.collapsed .badge-pending,
.dash-sidebar.collapsed .badge-new,
.dash-sidebar.collapsed .badge-active,
.dash-sidebar.collapsed .sidebar-logo span:not(.sidebar-logo-mark) {
  display: none;
}
.dash-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 12px 0;
}
.dash-sidebar.collapsed .sidebar-icon {
  margin: 0;
  font-size: 1.3rem;
}

/* ==========================================================================
   NOVO MÓDULO: Cardápio Digital Interativo
   ========================================================================== */
.cardapio-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.cardapio-banner-text h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.cardapio-banner-text p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.cardapio-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-qr-share {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-qr-share:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.cardapio-cats {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cardapio-cat-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.cardapio-cat-btn.active, .cardapio-cat-btn:hover {
  background: var(--primary-glow);
  color: #fff;
  border-color: var(--primary);
}

.cardapio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.cardapio-item-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
}
.cardapio-item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.cardapio-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.cardapio-item-emoji {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.cardapio-item-title h4 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
}
.cardapio-item-title p {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.cardapio-item-price {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: #10b981;
  margin: 12px 0;
}

.cardapio-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
}

.status-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-item-on {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-item-off {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

