/* ===================================================
   yaserMall Dashboard — Main Stylesheet
   =================================================== */
:root {
  --sidebar-width: 260px;
  --sidebar-bg: #1a1f2e;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: #f5a623;
  --topbar-height: 56px;
  --primary: #f5a623;
  --primary-dark: #d4891a;
  --bg-light: #f4f6fb;
}

/* Layout */
body { background: var(--bg-light); font-family: 'Segoe UI', Tahoma, sans-serif; }
#wrapper { min-height: 100vh; }

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: width 0.3s;
}
.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,0.08); min-height: var(--topbar-height); }
#sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
#sidebar .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
#sidebar .nav-link.active { background: var(--primary); color: #fff; font-weight: 600; }
#sidebar .nav-link .badge { font-size: 10px; }
.sidebar-footer { margin-top: auto; }
.avatar-circle {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 15px;
  flex-shrink: 0;
}

/* Page Content */
#page-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.main-content { flex: 1; }

/* Cards */
.stat-card {
  border: none;
  border-radius: 14px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #1a1f2e; }
.stat-card .stat-label { color: #8a94a6; font-size: 13px; }

/* Table */
.table-card { background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.table-card .table { margin-bottom: 0; }
.table-card .table th { background: #f8fafc; color: #6b7589; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #edf0f5; padding: 12px 16px; }
.table-card .table td { padding: 13px 16px; vertical-align: middle; border-color: #f0f2f5; font-size: 14px; }
.table-card .table tbody tr:hover { background: #fafbff; }

/* Badges */
.badge-status { font-size: 12px; padding: 5px 10px; border-radius: 20px; font-weight: 500; }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-warning { background: var(--primary); border-color: var(--primary); }

/* Login Page */
.login-page { background: linear-gradient(135deg, #1a1f2e 0%, #2d3452 100%); }
.login-card { border-radius: 18px; overflow: hidden; }
.login-header { background: linear-gradient(135deg, #f5a623, #d4891a); }

/* Modals */
.modal-header { background: #f8fafc; border-radius: 12px 12px 0 0; }

/* Form Controls */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

/* Charts container */
.chart-container { position: relative; height: 280px; }

/* Responsive */
@media (max-width: 991px) {
  #sidebar {
    position: fixed;
    right: 0; top: 0;
    transform: translateX(100%);
    z-index: 1050;
  }
  #sidebar.show { transform: translateX(0); }
  #page-content { width: 100%; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1040; }
  .sidebar-overlay.show { display: block; }
}

/* Search bar */
.search-box { max-width: 280px; }

/* Page header */
.page-header { margin-bottom: 24px; }
.page-header h5 { font-weight: 700; color: #1a1f2e; margin: 0; }

/* Empty state */
.empty-state { padding: 60px 20px; text-align: center; color: #aab; }
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: .4; }

/* Scrollbar */
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Toast notifications */
.toast-container { z-index: 9999; }
