/* =============================================
   GUIMAN — Dashboard Shared Styles
   ============================================= */

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.dash-body {
  background: var(--bg-dark);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: rgba(255, 251, 251, 0.95);
  border-right: var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
  backdrop-filter: blur(20px);
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(162, 123, 92, 0.5);
}

.sidebar-logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-user {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: var(--border-glass);
  background: var(--bg-card);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 2px solid rgba(162, 123, 92, 0.4);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--color-success);
}

.user-status .dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.75rem 1.5rem 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transition: transform var(--transition-fast);
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text-primary);
  background: rgba(162, 123, 92, 0.12);
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
  transform: scaleY(1);
}

.sidebar-link.active {
  color: #A27B5C;
  font-weight: 600;
}

.sidebar-link .link-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: transparent;
  transition: all var(--transition-fast);
}

.sidebar-link.active .link-icon {
  background: rgba(162, 123, 92, 0.3);
}

.sidebar-link:hover .link-icon {
  background: rgba(162, 123, 92, 0.2);
}

.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 1.25rem 1.5rem;
  border-top: var(--border-glass);
}

.sidebar-footer .sidebar-link {
  padding: 0.65rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.dash-main {
  margin-left: 260px;
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
  height: 70px;
  background: rgba(255, 251, 251, 0.85);
  border-bottom: var(--border-glass);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  gap: var(--space-md);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-breadcrumb span {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.icon-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--bg-dark-2);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  min-width: 240px;
}

.topbar-search input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  width: 100%;
}

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

/* =============================================
   CONTENT AREA
   ============================================= */
.dash-content {
  flex: 1;
  padding: var(--space-xl);
  overflow-y: auto;
}

.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =============================================
   STATS CARDS
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(162, 123, 92, 0.3);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card.stat-purple::after { background: var(--gradient-primary); }
.stat-card.stat-blue::after { background: #C68B59; }
.stat-card.stat-green::after { background: #2E7D32; }
.stat-card.stat-orange::after { background: #E8C5A5; }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon.purple { background: rgba(162, 123, 92, 0.2); }
.stat-icon.blue { background: rgba(198, 139, 89, 0.2); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-icon.orange { background: rgba(198, 139, 89, 0.12); }

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.stat-trend.up {
  color: var(--color-success);
  background: rgba(16, 185, 129, 0.12);
}

.stat-trend.down {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.12);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =============================================
   DASHBOARD CARDS
   ============================================= */
.dash-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.dash-card:hover {
  border-color: rgba(162, 123, 92, 0.25);
}

.dash-card-header {
  padding: var(--space-lg);
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.dash-card-body {
  padding: var(--space-lg);
}

/* =============================================
   TABLES
   ============================================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: var(--border-glass);
  white-space: nowrap;
}

.data-table td {
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

.table-avatar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.table-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.table-avatar-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.table-avatar-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status.active { background: rgba(16, 185, 129, 0.15); color: #065F46; }
.status.active::before { background: var(--color-success); }

.status.pending { background: rgba(249, 115, 22, 0.15); color: #92400E; }
.status.pending::before { background: var(--color-warning); }

.status.inactive { background: rgba(239, 68, 68, 0.12); color: #991B1B; }
.status.inactive::before { background: var(--color-danger); }

.status.verified { background: rgba(198, 139, 89, 0.15); color: #A27B5C; }
.status.verified::before { background: #C68B59; }

/* =============================================
   CHART CONTAINERS
   ============================================= */
.chart-container {
  position: relative;
  height: 250px;
}

.chart-container-lg {
  height: 320px;
}

/* =============================================
   FORM ELEMENTS (Dashboard)
   ============================================= */
.dash-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  background: #ffffff;
  border: 1px solid rgba(162, 123, 92, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  width: 100%;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(162, 123, 92, 0.6);
  box-shadow: 0 0 0 3px rgba(162, 123, 92, 0.12);
  outline: none;
  background: rgba(162, 123, 92, 0.03);
}

.form-select option {
  background: var(--bg-dark-3);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* =============================================
   TOGGLE / SWITCH
   ============================================= */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-med);
  box-shadow: var(--shadow-sm);
}

.toggle-input:checked + .toggle-track {
  background: var(--color-primary);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* =============================================
   ACTIVITY FEED
   ============================================= */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-icon.purple { background: rgba(162, 123, 92, 0.2); }
.activity-icon.green { background: rgba(16, 185, 129, 0.15); }
.activity-icon.blue { background: rgba(198, 139, 89, 0.15); }
.activity-icon.orange { background: rgba(198, 139, 89, 0.12); }

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.activity-text strong {
  color: var(--text-primary);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* =============================================
   PROFILE CARD (Provider)
   ============================================= */
.profile-hero-card {
  background: var(--gradient-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(162, 123, 92, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.profile-avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  border: 3px solid rgba(162, 123, 92, 0.5);
  box-shadow: 0 0 0 6px rgba(162, 123, 92, 0.1);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-med);
}

.profile-avatar-lg:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 6px rgba(162, 123, 92, 0.2), var(--shadow-glow);
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid var(--bg-dark-2);
}

.profile-info-main {
  flex: 1;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.profile-category {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-stats-row {
  display: flex;
  gap: var(--space-xl);
  margin-left: auto;
  text-align: center;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stat-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* =============================================
   SERVICE CARDS
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-med);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(162, 123, 92, 0.3);
  box-shadow: var(--shadow-md);
}

.service-card-img {
  height: 160px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.service-card-body {
  padding: var(--space-md);
}

.service-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.service-card-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.service-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   MAP (Dashboard)
   ============================================= */
.dash-map {
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-glass);
}

/* =============================================
   NOTIFICATION TOAST
   ============================================= */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: rgba(255, 251, 251, 0.98);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.toast.success .toast-icon { background: rgba(16, 185, 129, 0.2); }
.toast.error .toast-icon { background: rgba(239, 68, 68, 0.2); }
.toast.info .toast-icon { background: rgba(198, 139, 89, 0.2); }

.toast-text {
  flex: 1;
  font-size: 0.85rem;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.toast-msg {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* =============================================
   RATING STARS
   ============================================= */
.stars {
  display: flex;
  gap: 0.15rem;
  color: #F59E0B;
  font-size: 0.9rem;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--space-lg);
}

/* =============================================
   RESPONSIVE DASHBOARD
   ============================================= */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .dash-main {
    margin-left: 0;
  }

  .profile-hero-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats-row {
    margin-left: 0;
  }
}

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

  .services-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dash-content {
    padding: var(--space-md);
  }

  .topbar {
    padding: 0 var(--space-md);
  }

  .topbar-search {
    display: none;
  }
}

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