/* 
  Smart CONNECT QR — Dashboard Styles
  Modern SaaS Aesthetic
*/

:root {
    --primary: #6366F1;
    --primary-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    --bg-body: #F1F5F9;
    --bg-sidebar: #1E293B;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: rgba(226, 232, 240, 0.8);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.03) 0, transparent 50%);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 240px;
  background: var(--bg-sidebar);
  color: white;
  z-index: 1000;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  padding: 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand i {
  color: #6366f1;
  font-size: 1.5rem;
}
.sidebar-nav {
  padding: 0.5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 4px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.nav-item i {
  font-size: 1.1rem;
}
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 0;
}

/* Main Content */
.main-wrapper {
  margin-left: 240px;
  min-height: 100vh;
}
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px border var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.page-content {
  padding: 1.5rem;
}

/* Card Panels */
.card-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.card-panel__title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

/* Stats */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    border-color: var(--primary);
}
.stat-card__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}
.stat-card:hover .stat-card__icon {
    transform: scale(1.1) rotate(-5deg);
}
.stat-card--blue .stat-card__icon { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA; }
.stat-card--purple .stat-card__icon { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); color: #6D28D9; }
.stat-card--green .stat-card__icon { background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%); color: #15803D; }
.stat-card--orange .stat-card__icon { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); color: #C2410C; }
.stat-card--red .stat-card__icon { background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%); color: #DC2626; }

.stat-card--clickable {
    cursor: pointer;
}
.stat-card--clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}
.stat-card--red.stat-card--clickable:hover {
    border-color: #DC2626;
    box-shadow: 0 15px 30px -5px rgba(220, 38, 38, 0.15);
}

.stat-card__value { font-size: 1.75rem; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.05em; }
.stat-card__label { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }

/* Business Cards */
.business-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  height: 100%;
}
.business-card__header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--primary);
}
.business-card__logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  padding: 2px;
  object-fit: contain;
  position: absolute;
  bottom: -25px;
  left: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.business-card__initials {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  position: absolute;
  bottom: -25px;
  left: 1.5rem;
}
.business-card__body {
  padding: 35px 1.5rem 1rem;
}
.business-card__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

/* Reviews */
.review-item {
  background: #f1f5f9;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.review-item--inactive {
  opacity: 0.5;
  background: #f8fafc;
}
.review-item__text {
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}
.review-item__actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

/* Auth */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
.auth-container {
  width: 100%;
  max-width: 420px;
}
.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}
.auth-logo h1 {
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 0;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Conversion Ring */
.conversion-ring {
  position: relative;
  display: inline-block;
}
.conversion-ring__value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
}
