/* =============================================================
   I-BOOIKNG — User Panel
   Self-contained dashboard styling (sidebar + topbar + cards),
   matching the site's primary brand color (--primary: #FF385C)
   the same way seller/*.php uses the teal-coral logo palette.
   ============================================================= */
:root {
  --user-primary: #FF385C;
  --user-primary-dark: #D93B30;
  --user-bg: #f5f6f8;
  --user-border: #ebebeb;
  --user-text-dark: #222;
  --user-text-mid: #484848;
  --user-text-secondary: #717171;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--user-bg);
  color: var(--user-text-dark);
}

.text-user { color: var(--user-primary) !important; }
.btn-user {
  background: linear-gradient(135deg, #ff5b78, var(--user-primary));
  border: none; color: #fff;
  transition: filter .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 8px 18px rgba(255,56,92,0.28);
}
.btn-user:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff; box-shadow: 0 12px 24px rgba(255,56,92,0.36); }
.btn-user:focus, .btn-user:active { color: #fff; }

/* ── Layout: sidebar + topbar + content ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 1030;
  background: #1c1f26; color: #cfd3da; overflow-y: auto;
  transition: transform .25s ease;
}
.sidebar-brand { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand .logo-text { font-size: 19px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.sidebar-brand .logo-sub { font-size: 12px; color: #9aa0ab; margin-top: 2px; }
.sidebar-nav { padding: 14px 12px; }
.nav-section-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; padding: 14px 10px 6px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500;
  color: #cfd3da; transition: background .15s, color .15s;
}
.sidebar-nav .nav-link i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav .nav-link.active { background: linear-gradient(135deg, #ff5b78, var(--user-primary)); color: #fff; }
.sidebar-nav .nav-link.text-danger-subtle { color: #ff8a8a; }
.sidebar-nav .nav-link.text-danger-subtle:hover { background: rgba(220,53,69,0.14); color: #ff9d9d; }

.sidebar-bottom { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 12px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #ff5b78, var(--user-primary)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 11.5px; color: #9aa0ab; }

#sidebarOverlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1025; }
#sidebarOverlay.show { display: block; }

.topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-bottom: 1px solid var(--user-border);
  padding: 12px 22px; margin-left: 250px;
}
.btn-sidebar-toggle { display: none; border: none; background: none; font-size: 20px; color: var(--user-text-dark); }
.page-title { font-size: 16px; font-weight: 700; color: var(--user-text-dark); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-icon-btn { position: relative; border: none; background: none; font-size: 18px; color: var(--user-text-mid); }
.notif-badge {
  position: absolute; top: -4px; right: -6px; background: var(--user-primary); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; line-height: 1.3;
}
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #ff5b78, var(--user-primary)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.admin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-name { font-size: 13px; font-weight: 600; color: var(--user-text-dark); line-height: 1.2; }
.admin-role { font-size: 11px; color: var(--user-text-secondary); }

.main-content { margin-left: 250px; min-height: 100vh; }
.content-wrap { padding: 22px; max-width: 1240px; }

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .topbar, .main-content { margin-left: 0; }
  .btn-sidebar-toggle { display: inline-block; }
}

/* ── Cards ── */
.user-card { background: #fff; border: 1px solid var(--user-border); border-radius: 14px; margin-bottom: 0; }
.user-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--user-border);
}
.user-card-title { font-size: 14.5px; font-weight: 700; color: var(--user-text-dark); margin: 0; }
.user-card-body { padding: 18px; }

.user-breadcrumb { font-size: 13px; color: var(--user-text-secondary); margin-bottom: 18px; }
.user-breadcrumb a { color: var(--user-text-secondary); text-decoration: none; }
.user-breadcrumb a:hover { color: var(--user-primary); }
.user-breadcrumb .sep { margin: 0 6px; }

/* ── Stat cards (dashboard) ── */
.stat-card { border-radius: 14px; padding: 18px 20px; color: #fff; height: 100%; }
.stat-card .stat-icon { font-size: 22px; opacity: .9; margin-bottom: 10px; }
.stat-card .stat-num { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: 12.5px; opacity: .92; margin-top: 4px; }
.bg-grad-blue   { background: linear-gradient(135deg,#3b7bd6,#2c5fb0); }
.bg-grad-orange { background: linear-gradient(135deg,#ff9a5a,#ef5a4d); }
.bg-grad-green  { background: linear-gradient(135deg,#2fae66,#1a7a47); }
.bg-grad-pink   { background: linear-gradient(135deg,#ff5b78,var(--user-primary)); }

/* ── Table ── */
.user-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.user-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--user-text-secondary); padding: 10px 14px; border-bottom: 1px solid var(--user-border); white-space: nowrap;
}
.user-table td { padding: 12px 14px; border-bottom: 1px solid var(--user-border); vertical-align: middle; }
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr:hover { background: #fafafa; }

.empty-state i { opacity: .5; }

/* ── Auth pages (login / register) ── */
.user-auth-body { background: #f0f2f5; min-height: 100vh; display: flex; align-items: center; }
.user-auth-card { max-width: 460px; width: 100%; margin: auto; }
.user-auth-logo { font-size: 1.6rem; font-weight: 800; color: var(--user-primary); letter-spacing: -0.5px; }
.toggle-password { cursor: pointer; }
