/* Left sidebar: logo/header fixed, menu list scrolls vertically */
.iq-sidebar.sidebar-default {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.iq-sidebar.sidebar-default .iq-sidebar-logo {
  flex: 0 0 auto;
}

.iq-sidebar.sidebar-default .data-scrollbar {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Account menu: custom panel (not Bootstrap dropdown) — clickable avatar + floating card */
.user-profile-nav-item {
  overflow: visible !important;
  position: relative;
  z-index: 10060;
}

.user-profile-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.user-profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  border-radius: 50%;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.user-profile-menu-trigger:focus {
  outline: 2px solid rgba(1, 104, 250, 0.45);
  outline-offset: 2px;
}

.user-profile-menu-trigger img {
  display: block;
  vertical-align: middle;
}

.user-profile-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  max-width: min(320px, calc(100vw - 24px));
  z-index: 10050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}

.user-profile-menu-wrap.is-open .user-profile-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.user-profile-menu-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.user-profile-menu-banner {
  height: 72px;
  background: linear-gradient(135deg, #32bdea 0%, #0168fa 100%);
}

.user-profile-menu-avatar {
  margin-top: -36px;
  padding-bottom: 0.25rem;
}

.user-profile-menu-body {
  padding: 0.75rem 1rem 1rem;
}

.user-profile-menu-actions li {
  margin: 0;
}

.user-profile-menu-link {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.12s ease;
}

a.user-profile-menu-link:hover,
a.user-profile-menu-link:focus {
  background: #f1f5f9;
  color: #0168fa;
  text-decoration: none;
}

button.user-profile-menu-link {
  font: inherit;
  cursor: pointer;
}

button.user-profile-menu-link:hover,
button.user-profile-menu-link:focus {
  background: #fef2f2;
}

.user-profile-menu-link--danger {
  color: #b91c1c !important;
}

.user-profile-menu-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: #e2e8f0;
  list-style: none;
}

.iq-top-navbar .navbar-collapse,
.iq-top-navbar .navbar-nav {
  overflow: visible !important;
}

/* PrintMart logo sizing in navbar / sidebar */
.printmart-brand-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

/* Icon fonts: keep Remix glyphs aligned with adjacent text (after CDN font load) */
.btn i[class^="ri-"],
.btn i[class*=" ri-"] {
  font-size: 1.125em;
  line-height: 1;
  vertical-align: middle;
}

.product-edit-section-icon [class^="ri-"],
.product-edit-section-icon [class*=" ri-"],
.product-details-section-icon [class^="ri-"],
.product-details-section-icon [class*=" ri-"] {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* —— App footer —— */
.site-footer {
  --footer-fg: #3d4a5c;
  --footer-fg-muted: #6b7c93;
  --footer-border: rgba(15, 23, 42, 0.08);
  --footer-chip-bg: #fff;
  --footer-chip-border: #e2e8f0;
  --footer-accent: #0f6efd;
  margin-top: 1.5rem;
  border-top: 1px solid var(--footer-border);
  background: linear-gradient(180deg, #fbfcfd 0%, #f0f3f7 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.8) inset;
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 0 1.125rem;
  max-width: 100%;
}

.site-footer__bar--stacked {
  flex-direction: column;
  text-align: center;
  justify-content: center;
  padding: 1.5rem 1rem 1.75rem;
}

.site-footer--auth {
  width: 100%;
  max-width: 920px;
  margin-top: 1.25rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--footer-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.site-footer__credit {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.site-footer__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-fg-muted);
}

.site-footer__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1a2332;
  letter-spacing: -0.01em;
}

.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.site-footer__bar--stacked .site-footer__actions {
  justify-content: center;
}

.site-footer__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--footer-fg);
  background: var(--footer-chip-bg);
  border: 1px solid var(--footer-chip-border);
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease,
    transform 0.12s ease;
}

.site-footer__chip i {
  font-size: 1.15rem;
  line-height: 1;
}

.site-footer__chip-label {
  font-weight: 600;
  color: #334155;
}

.site-footer__chip-value {
  font-weight: 500;
  color: var(--footer-fg-muted);
  font-size: 0.78rem;
}

.site-footer__chip--wa i {
  color: #25d366;
}

.site-footer__chip--email i {
  color: var(--footer-accent);
}

.site-footer__chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  color: var(--footer-fg);
  transform: translateY(-1px);
}

.site-footer__chip--wa:hover {
  border-color: rgba(37, 211, 102, 0.45);
}

.site-footer__chip--email:hover {
  border-color: rgba(15, 110, 253, 0.35);
}

.site-footer__legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--footer-fg-muted);
  letter-spacing: 0.03em;
}

@media (max-width: 767.98px) {
  .site-footer__bar:not(.site-footer__bar--stacked) {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .site-footer__bar:not(.site-footer__bar--stacked) .site-footer__credit {
    align-items: center;
  }

  .site-footer__bar:not(.site-footer__bar--stacked) .site-footer__actions {
    justify-content: center;
  }

  .site-footer__bar:not(.site-footer__bar--stacked) .site-footer__legal {
    width: 100%;
    text-align: center;
    padding-top: 0.25rem;
    border-top: 1px dashed var(--footer-border);
  }
}

/* Dashboard: KPI cards use full row width (avoid nesting col-lg-3 inside col-lg-8) */
.dashboard-kpi-row .dashboard-kpi-card {
  min-height: 0;
}

/* Flex child text truncation when Bootstrap min-w-0 missing (older themes) */
.dashboard-kpi-row .min-w-0 {
  min-width: 0;
}

/* —— Profile page (centered layout, hash sections, top bar scroll offset) —— */
.profile-page {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 2rem;
}

.profile-page-title {
  color: #1a2332;
  letter-spacing: -0.02em;
}

.profile-page-hero {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 48%, #f0f7ff 100%);
}

.profile-page-hero-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}

.profile-page-hero-img--placeholder {
  object-fit: contain;
  padding: 0.5rem;
  background: #f1f5f9;
}

.profile-page-nav {
  border-radius: 12px;
}

.profile-page-pills .nav-link {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid transparent;
}

.profile-page-pills .nav-link:hover {
  background: #f1f5f9;
  color: #0168fa;
}

.profile-page-pills .nav-link.active {
  background: #0168fa;
  color: #fff !important;
  border-color: #0168fa;
  box-shadow: 0 4px 14px rgba(1, 104, 250, 0.28);
}

.profile-tab-panes {
  scroll-margin-top: 88px;
}

/* Only one tab body visible at a time (JS toggles .is-active + hidden) */
.profile-tab-panes > .profile-tab-pane:not(.is-active) {
  display: none !important;
}

.profile-tab-panes > .profile-tab-pane.is-active {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  animation: profile-tab-enter 0.22s ease-out;
}

@keyframes profile-tab-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-page-dl dt {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.profile-page-dl dd {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0;
  border-bottom: 1px solid #f1f5f9;
}

.profile-page-dl dd:last-of-type {
  border-bottom: none;
}

.profile-page-preview {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  background: #fafbfc;
}

.profile-page-preview--placeholder {
  max-height: 160px;
  padding: 1.25rem;
}

.profile-page-form .form-group:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .profile-page-pills .nav-link {
    text-align: center;
  }
}
