/* ============================================
   salonfy Platform — Main CSS
   ============================================ */
:root {
  --primary: #EC4899;
  --primary-light: #FCE7F3;
  --secondary: #8B5CF6;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  margin: 0;
}

/* =========== Layout =========== */
.main-layout {
  display: block;
  min-height: 100vh;
}

/* =========== Sidebar =========== */
.sidebar {
  background: var(--white);
  border-left: 1px solid var(--border);
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: var(--sidebar-w);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.brand-sub  { font-size: 0.72rem; color: var(--text-secondary); }

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

.nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-divider { border-top: 1px solid var(--border); margin: 0.5rem 0.875rem; }

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

.plan-badge { font-size: 0.82rem; color: var(--text-secondary); }

/* =========== Main Content =========== */
.main-content {
  margin-right: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-weight: 600;
  font-size: 1.05rem;
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.topbar-bell {
  min-width: 40px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown {
  width: min(360px, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.notification-item-unread {
  background: linear-gradient(90deg, rgba(236,72,153,0.07), rgba(236,72,153,0.02));
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-time {
  font-size: 0.72rem;
}

.content-wrapper {
  padding: 1.5rem;
  width: 100%;
  min-width: 0;
}

/* =========== Cards & Stats =========== */
.card { border-radius: 0.875rem !important; }

.stat-card {
  background: var(--white);
  border-radius: 0.875rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* Background utilities */
.bg-primary-light { background: var(--primary-light) !important; }
.bg-success-light { background: #D1FAE5 !important; }
.bg-warning-light { background: #FEF3C7 !important; }
.bg-info-light    { background: #DBEAFE !important; }
.bg-danger-light  { background: #FEE2E2 !important; }

/* Badge subtle */
.bg-primary-subtle { background: #FCE7F3 !important; }
.bg-success-subtle { background: #D1FAE5 !important; }
.bg-warning-subtle { background: #FEF3C7 !important; }
.bg-danger-subtle  { background: #FEE2E2 !important; }
.bg-info-subtle    { background: #DBEAFE !important; }
.bg-secondary-subtle { background: #F3F4F6 !important; }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-info    { color: var(--info)    !important; }

/* Buttons */
.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.btn-primary:hover { background: #db2777 !important; border-color: #db2777 !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background: var(--primary) !important; color: #fff !important; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

/* Table */
.table > :not(caption) > * > * { padding: 0.875rem 1rem; }

/* Forms */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(236,72,153,0.2);
}

/* fw utilities */
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}

.sidebar-overlay.show { display: block; }

/* =========== Mobile =========== */
@media (max-width: 991px) {
  .main-content {
    margin-right: 0;
    width: 100%;
  }
  .sidebar {
    transform: translateX(100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
}
