/* ==========================================================================
   RideX Modern UI — layered on top of the Ynex theme.
   ========================================================================== */

:root {
  --rx-radius: 16px;
  --rx-radius-sm: 12px;
  --rx-shadow: 0 6px 24px -8px rgba(23, 43, 99, 0.12);
  --rx-shadow-hover: 0 12px 30px -8px rgba(23, 43, 99, 0.18);
  --rx-border: 1px solid rgba(23, 43, 99, 0.08);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Cards ---------- */
.card.custom-card {
  border-radius: var(--rx-radius);
  border: var(--rx-border);
  box-shadow: none;
}
.card.custom-card:hover {
  box-shadow: var(--rx-shadow-hover);
}
.card-header {
  border-block-end: var(--rx-border);
  padding: 1rem 1.25rem;
}
.card-header .card-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-body {
  padding: 1.25rem;
}

/* ---------- Modern stat cards (dashboard) ---------- */
.stat-modern {
  position: relative;
  overflow: hidden;
  border-radius: var(--rx-radius);
  border: var(--rx-border);
  background: var(--custom-white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--rx-shadow);
}
.stat-modern::after {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  inset-block-end: -40px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.08;
}
.stat-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rx-radius-sm);
}
.stat-gradient {
  background: linear-gradient(135deg, var(--rx-a, #6c5ffc), var(--rx-b, #8b5cf6));
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Hero / greeting banner ---------- */
.hero-modern {
  border-radius: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-modern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,.25) 0, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.12) 0, transparent 40%);
}
.hero-gradient {
  background: linear-gradient(120deg, #6c5ffc 0%, #8b5cf6 45%, #7c3aed 100%);
}
.hero-gradient-success {
  background: linear-gradient(120deg, #0d9e6c 0%, #16a34a 100%);
}
.hero-chip {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  border-radius: var(--rx-radius-sm);
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 10px;
  font-weight: 500;
}
.btn-wave {
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-wave:hover {
  transform: translateY(-1px);
}

/* ---------- Tables ---------- */
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--default-text-color);
  opacity: 0.7;
  font-weight: 600;
  border-block-end-width: 1px;
  white-space: nowrap;
}
.table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.table-hover tbody tr {
  transition: background-color 0.15s ease;
}

/* ---------- Badges ---------- */
.badge {
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- Avatar soft tints ---------- */
.avatar {
  border-radius: 12px;
}

/* ---------- Progress ---------- */
.progress {
  border-radius: 999px;
  overflow: hidden;
}

/* ---------- Sidebar active state ---------- */
.side-menu__item.active {
  background: linear-gradient(90deg, rgba(108, 95, 252, 0.16), rgba(108, 95, 252, 0.04));
  border-inline-start: 3px solid #6c5ffc;
}

/* ---------- Modern Sidebar ---------- */
.rx-sidebar {
  border-inline-end: 1px solid rgba(23, 43, 99, 0.06);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 transparent;
}
.app-sidebar .main-sidebar-header {
  min-height: 3.9rem;
  height: auto;
  display: flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  margin: 0;
  border-block-end: 1px solid rgba(23, 43, 99, 0.06);
  background: #fff;
  overflow: visible;
}
.app-sidebar .main-sidebar-header .header-logo {
  display: flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.app-sidebar .main-sidebar-header .header-logo img {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

/* ---------- Categories ---------- */
.app-sidebar .slide__category {
  padding-block-start: 0.8rem;
  padding-block-end: 0.1rem;
}
.app-sidebar .slide__category .category-name {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: #9aa1b2;
  padding-inline: 1.4rem;
}

/* ---------- Menu items -> modern rounded pills ---------- */
.app-sidebar .main-menu {
  padding-block: 0.2rem 1rem;
}
.app-sidebar .side-menu__item {
  margin: 0.06rem 0.7rem;
  border-radius: 11px;
  padding: 0.46rem 0.8rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  position: relative;
  gap: 0.6rem;
}
.app-sidebar .side-menu__item:hover {
  background: rgba(108, 95, 252, 0.08);
  transform: translateX(2px);
  color: #6c5ffc;
}
.app-sidebar .side-menu__item.active {
  background: linear-gradient(120deg, #6c5ffc, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(108, 95, 252, 0.55);
  border-inline-start: none;
}
.app-sidebar .side-menu__item.active .side-menu__icon,
.app-sidebar .side-menu__item.active .side-menu__label,
.app-sidebar .side-menu__item.active .side-menu__angle {
  color: #fff !important;
}
.app-sidebar .side-menu__label {
  font-weight: 500;
  font-size: 0.87rem;
  color: #536485;
}
.app-sidebar .side-menu__item.active .side-menu__label { color: #fff !important; }
.app-sidebar .side-menu__icon {
  font-size: 1.18rem;
  color: #78849b;
  flex-shrink: 0;
}
.app-sidebar .side-menu__item.active .side-menu__icon { color: #fff !important; }
.app-sidebar .side-menu__angle {
  color: #9aa1b2;
  transition: transform 0.2s ease;
}
.app-sidebar .has-sub.open > .side-menu__item .side-menu__angle {
  transform: rotate(180deg);
}

/* ---------- Modern badges in menu ---------- */
.app-sidebar .side-menu__item .badge {
  font-size: 0.62rem;
  padding: 0.28em 0.55em;
  border-radius: 30px;
  font-weight: 600;
}

/* ---------- Submenus ---------- */
.app-sidebar .slide-menu {
  border-radius: 11px;
  margin: 0.05rem 0.9rem 0.2rem 0.9rem;
  padding-block: 0.15rem;
  background: rgba(23, 43, 99, 0.02);
  position: relative;
}
.app-sidebar .slide-menu.child1 .side-menu__item {
  border-radius: 8px;
  margin-inline: 0.2rem;
  padding: 0.38rem 0.65rem 0.38rem 2.2rem;
  font-size: 0.82rem;
  position: relative;
}
.app-sidebar .slide-menu.child1 .side-menu__item::before {
  content: "";
  position: absolute;
  inset-inline-start: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(120, 132, 155, 0.55);
}
.app-sidebar .slide-menu.child1 .side-menu__item:hover::before {
  background: #6c5ffc;
}
.app-sidebar .slide-menu.child1 .side-menu__item.active::before {
  background: #6c5ffc;
}
.app-sidebar .slide-menu.child1 .side-menu__item:hover {
  color: #6c5ffc;
  background: rgba(108, 95, 252, 0.08);
  transform: none;
}
.app-sidebar .slide-menu.child1 .side-menu__item.active .side-menu__label {
  color: #6c5ffc !important;
  font-weight: 600;
}
.app-sidebar .slide-menu .side-menu__label1 {
  padding-inline: 2.2rem;
}
.app-sidebar .slide-menu .side-menu__label1 a {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #a3aab9;
}

/* ---------- Help card ---------- */
.rx-help {
  position: absolute;
  inset-inline: 0.9rem;
  bottom: 0.9rem;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #6c5ffc 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(108, 95, 252, 0.5);
}
.rx-help-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  top: -40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(20px);
}
.rx-help-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.85rem;
}
.rx-help-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.rx-help-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.rx-help-title {
  font-weight: 600;
  font-size: 0.82rem;
}
.rx-help-sub {
  font-size: 0.7rem;
  opacity: 0.9;
}
.rx-help-btn {
  margin-inline-start: auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #6c5ffc;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.rx-help-btn:hover { transform: translate(1px, -1px); }

/* ---------- Collapsed state: hide help card ---------- */
[data-toggled="icon-click-closed"] .rx-help,
[data-toggled="icon-hover-closed"] .rx-help,
[data-toggled="menu-hover-closed"] .rx-help,
[data-vertical-style="doublemenu"] .rx-help {
  display: none !important;
}

/* ---------- Scrollbar for sidebar ---------- */
.main-sidebar::-webkit-scrollbar { width: 4px; }
.main-sidebar::-webkit-scrollbar-thumb { background: rgba(23, 43, 99, 0.15); border-radius: 10px; }

/* ---------- Desktop: force sidebar always visible & full height ----------
   The base theme loads the vertical sidebar in a collapsed/off-canvas state
   and hides .main-sidebar-header until JS expands it. For an admin panel we
   want a persistent sidebar; force it open on desktop so the logo header and
   menu are always visible. */
@media (min-width: 992px) {
  .app-sidebar {
    position: fixed !important;
    inset-block-start: 0 !important;
    inset-inline-start: 0 !important;
    width: 15rem !important;
    height: 100vh !important;
    min-height: 100vh !important;
    transform: none !important;
    inset-inline-end: auto !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }
  .app-sidebar .main-sidebar-header {
    display: flex !important;
    visibility: visible !important;
    position: relative !important;
    flex-shrink: 0;
  }
  .app-sidebar .main-sidebar {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto !important;
    position: relative;
  }
  .app-sidebar .main-sidebar .simplebar-wrapper {
    height: auto !important;
    overflow: visible !important;
  }
  .app-sidebar .main-sidebar .simplebar-content-wrapper {
    overflow: visible !important;
    height: auto !important;
  }
  .app-sidebar .main-sidebar .simplebar-content {
    transform: none !important;
    overflow: visible !important;
  }
  .app-sidebar .main-sidebar .simplebar-track {
    display: none !important;
  }
  .app-header {
    padding-inline-start: 15rem !important;
  }
  .main-content.app-content {
    margin-inline-start: 15rem !important;
  }
}

/* ---------- Sticky footer ---------- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-content.app-content {
  flex: 1 0 auto;
}
.footer {
  margin-top: auto;
  width: auto;
}
@media (min-width: 992px) {
  .footer {
    padding-inline-start: 15rem !important;
    margin-inline-start: auto;
  }
}

/* ---------- Page header ---------- */
.page-header-breadcrumb {
  background: transparent;
}

/* ---------- Charts container ---------- */
.apexcharts-canvas {
  font-family: inherit !important;
}

/* ---------- Small screen ---------- */
@media (max-width: 576px) {
  .stat-value {
    font-size: 1.4rem;
  }
}
