/* =============================================================
   assets/css/app.css
   Dashboard শেল: Top bar + Sidebar Drawer + Bottom Nav
   (login.php এর style.css এর উপর বিল্ড করা, এক্সটেনশন হিসেবে)
   ============================================================= */

body.role-admin,
body.role-user {
  padding-top: 64px;    /* topbar এর জায়গা */
  padding-bottom: 72px; /* bottom-nav এর জায়গা */
  min-height: 100vh;
}

/* -----------------------------------------------------------
   TOP BAR
   ----------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: 64px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;

  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(31, 41, 55, 0.08);
  color: var(--color-text);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:active { transform: scale(0.94); }

/* -----------------------------------------------------------
   SIDEBAR DRAWER (Off-canvas, glass)
   ----------------------------------------------------------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.sidebar-drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 82%;
  max-width: 320px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 12px 0 40px rgba(31, 41, 55, 0.15);
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: 20px 16px calc(16px + var(--safe-bottom));
  overflow-y: auto;
}
.sidebar-drawer.open {
  transform: translateX(0);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
  position: relative;
}
.avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.user-name {
  font-weight: 700;
  font-size: 14.5px;
  margin: 0;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}
.sidebar-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 32px;
  height: 32px;
}

/* Sidebar Menu (dynamic, from menus table) */
.sidebar-nav-wrap { flex: 1; }
.sidebar-menu, .sidebar-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-submenu {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 2px solid rgba(31, 41, 55, 0.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
li.has-children.open > .sidebar-submenu {
  max-height: 500px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  transition: background 0.2s, color 0.2s;
}
.sidebar-link i:first-child {
  width: 20px;
  text-align: center;
  color: var(--color-text-muted);
}
.sidebar-link:hover,
li.active > .sidebar-link {
  background: rgba(22, 163, 74, 0.10);
  color: var(--color-primary-dark);
}
li.active > .sidebar-link i:first-child {
  color: var(--color-primary);
}
.submenu-caret {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.25s ease;
}
li.has-children.open > .sidebar-link .submenu-caret {
  transform: rotate(180deg);
}
.sidebar-empty {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 20px 0;
}
.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(31, 41, 55, 0.08);
}

/* -----------------------------------------------------------
   BOTTOM NAVIGATION (native app style)
   ----------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 6px calc(8px + var(--safe-bottom));

  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(31, 41, 55, 0.08);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.bottom-nav-item i {
  font-size: 18px;
}
.bottom-nav-item.active {
  color: var(--color-primary);
  background: rgba(22, 163, 74, 0.10);
}

/* -----------------------------------------------------------
   STAT CARDS (Dashboard summary)
   ----------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--glass-shadow);
}
.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  margin-bottom: 10px;
}
.stat-card.green .stat-icon { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.stat-card.blue  .stat-icon { background: linear-gradient(135deg, var(--color-secondary), #1e3a8a); }
.stat-card .stat-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 2px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

/* -----------------------------------------------------------
   SECTION HEADING
   ----------------------------------------------------------- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.section-heading a {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

/* -----------------------------------------------------------
   QUICK ACTION CARDS (horizontal scroll on mobile)
   ----------------------------------------------------------- */
.quick-actions-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.quick-actions-scroll::-webkit-scrollbar { display: none; }

.quick-card {
  flex: 0 0 150px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-decoration: none;
  box-shadow: var(--glass-shadow);
  transition: transform 0.15s ease;
}
.quick-card:active { transform: scale(0.96); }
.quick-card .quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  margin-bottom: 12px;
}
.quick-card.green .quick-icon { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.quick-card.blue  .quick-icon { background: linear-gradient(135deg, var(--color-secondary), #1e3a8a); }
.quick-card .quick-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
  line-height: 1.3;
}
.quick-card .quick-subtitle {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* -----------------------------------------------------------
   LIST CARD (recent donations / requests)
   ----------------------------------------------------------- */
.list-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.06);
}
.list-row:last-child { border-bottom: none; }
.list-row .row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.10);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row .row-sub {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin: 0;
}
.list-row .row-amount {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-primary-dark);
  white-space: nowrap;
}
.empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--color-text-muted);
  font-size: 13.5px;
}
.empty-state i {
  font-size: 30px;
  margin-bottom: 10px;
  opacity: 0.5;
  display: block;
}

/* -----------------------------------------------------------
   BADGES (status labels)
   ----------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-success { background: rgba(22, 163, 74, 0.12);  color: #15803d; }
.badge-warning { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.badge-danger  { background: rgba(220, 38, 38, 0.12);  color: #b91c1c; }
.badge-muted   { background: rgba(107, 114, 128, 0.14); color: #4b5563; }

/* -----------------------------------------------------------
   Page content wrapper
   ----------------------------------------------------------- */
.page-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 24px;
}
