/*
 * SOQ Edu panel sidebar (resources/views/design_1/panel/includes/sidebar/soq_sidebar.blade.php).
 * Loaded by both the soq_panel (Tailwind) and the legacy panel (Bootstrap) layouts, so every rule is
 * self-contained: no Tailwind/Bootstrap utilities, explicit resets, logical properties for RTL.
 */
.soq-sidebar {
  --soq-sb-background: oklch(0.991 0.006 83);
  --soq-sb-foreground: oklch(0.22 0.035 255);
  --soq-sb-card: #fff;
  --soq-sb-navy: oklch(0.265 0.075 255);
  --soq-sb-navy-foreground: oklch(0.985 0.004 83);
  --soq-sb-secondary: oklch(0.965 0.018 83);
  --soq-sb-secondary-hover: oklch(0.965 0.018 83 / 0.6);
  --soq-sb-muted: oklch(0.49 0.025 255);
  --soq-sb-muted-soft: oklch(0.49 0.025 255 / 0.7);
  --soq-sb-border: oklch(0.9 0.015 83);
  --soq-sb-gold: oklch(0.77 0.13 82);
  --soq-sb-gold-soft: oklch(0.93 0.055 83);
  --soq-sb-destructive: oklch(0.577 0.245 27.325);
  --soq-sb-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --soq-sb-serif: "Cormorant Garamond", Georgia, serif;

  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-family: var(--soq-sb-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--soq-sb-foreground);
  text-align: start;
}

.soq-sidebar *,
.soq-sidebar *::before,
.soq-sidebar *::after {
  box-sizing: border-box;
}

/* ---------- Profile card ---------- */
.soq-sidebar .soq-sidebar__profile {
  padding: 16px;
  border: 1px solid var(--soq-sb-border);
  border-radius: 12px;
  background: var(--soq-sb-card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  text-align: center;
}

.soq-sidebar .soq-sidebar__avatar {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border: 2px solid var(--soq-sb-gold-soft);
  border-radius: 9999px;
  object-fit: cover;
}

.soq-sidebar .soq-sidebar__name {
  margin: 8px 0 0;
  font-family: var(--soq-sb-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--soq-sb-navy);
  overflow-wrap: anywhere;
}

.soq-sidebar .soq-sidebar__rate {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.soq-sidebar .soq-sidebar__rate .stars-card {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.soq-sidebar .soq-sidebar__rate .stars-card__item {
  display: inline-flex;
  color: var(--soq-sb-border);
}

.soq-sidebar .soq-sidebar__rate .stars-card__item.active {
  color: var(--soq-sb-gold);
}

.soq-sidebar .soq-sidebar__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  padding: 8px 0;
  border-radius: 8px;
  background: var(--soq-sb-secondary);
}

.soq-sidebar .soq-sidebar__stat + .soq-sidebar__stat {
  border-inline-start: 1px solid var(--soq-sb-border);
}

.soq-sidebar .soq-sidebar__stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--soq-sb-navy);
}

.soq-sidebar .soq-sidebar__stat-label {
  display: block;
  font-size: 12px;
  color: var(--soq-sb-muted);
}

/* ---------- Menu ---------- */
.soq-sidebar .soq-sidebar__nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.soq-sidebar .soq-sidebar__section {
  margin: 16px 0 0;
  padding: 0 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--soq-sb-muted-soft);
}

.soq-sidebar .soq-sidebar__section:first-child {
  margin-top: 4px;
}

.soq-sidebar .soq-sidebar__group {
  margin: 0;
  padding: 0;
  border: 0;
}

.soq-sidebar .soq-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--soq-sb-muted);
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.soq-sidebar .soq-sidebar__link::-webkit-details-marker {
  display: none;
}

.soq-sidebar .soq-sidebar__link:hover,
.soq-sidebar .soq-sidebar__link:focus-visible {
  background: var(--soq-sb-secondary-hover);
  color: var(--soq-sb-foreground);
  text-decoration: none;
}

.soq-sidebar .soq-sidebar__link.is-active {
  background: var(--soq-sb-secondary);
  font-weight: 600;
  color: var(--soq-sb-navy);
}

.soq-sidebar .soq-sidebar__link.is-danger {
  color: var(--soq-sb-destructive);
}

.soq-sidebar .soq-sidebar__link.is-danger:hover {
  background: oklch(0.577 0.245 27.325 / 0.1);
  color: var(--soq-sb-destructive);
}

.soq-sidebar .soq-sidebar__icon {
  display: flex;
  flex-shrink: 0;
  color: inherit;
}

.soq-sidebar .soq-sidebar__icon svg {
  width: 16px;
  height: 16px;
}

.soq-sidebar .soq-sidebar__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.soq-sidebar .soq-sidebar__chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.soq-sidebar .soq-sidebar__group[open] > .soq-sidebar__link .soq-sidebar__chevron {
  transform: rotate(180deg);
}

.soq-sidebar .soq-sidebar__sub {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  margin-inline-start: 20px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--soq-sb-border);
}

.soq-sidebar .soq-sidebar__sublink {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--soq-sb-muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.soq-sidebar .soq-sidebar__sublink:hover,
.soq-sidebar .soq-sidebar__sublink:focus-visible {
  background: var(--soq-sb-secondary-hover);
  color: var(--soq-sb-foreground);
  text-decoration: none;
}

.soq-sidebar .soq-sidebar__sublink.is-active {
  font-weight: 600;
  color: var(--soq-sb-navy);
}

.soq-sidebar .soq-sidebar__badge {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: var(--soq-sb-navy);
  font-size: 10px;
  font-weight: 700;
  color: var(--soq-sb-navy-foreground);
}

/* ---------- Admin banner (panel sidebar settings) ---------- */
.soq-sidebar .soq-sidebar__banner {
  display: none;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--soq-sb-border);
  border-radius: 12px;
}

.soq-sidebar .soq-sidebar__banner img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .soq-sidebar .soq-sidebar__banner {
    display: block;
  }
}

/* ---------- Legacy panel layout frame (#panelSidebar keeps its width, mobile toggle and simplebar) ---------- */
body.soq-user-panel #panelSidebar.panel-sidebar {
  background: var(--soq-edu-background, oklch(0.991 0.006 83));
}

body.soq-user-panel #panelSidebar .panel-sidebar__contents {
  background: transparent !important;
}

body.soq-user-panel #panelSidebar .soq-sidebar {
  padding: 24px 16px;
}

body.soq-user-panel #panelSidebar .js-show-panel-sidebar {
  justify-content: flex-end;
  padding: 0 16px;
}

/* ---------- Panel Workspace Shell (Unified docked layout across all panel views) ---------- */
.soq-panel-layout {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 65px);
  align-items: stretch;
}

.soq-panel-layout__sidebar {
  display: none;
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex: 0 0 260px;
  box-sizing: border-box;
  border-right: 1px solid var(--soq-sb-border, oklch(0.9 0.015 83));
  background: var(--soq-sb-background, oklch(0.991 0.006 83));
  padding: 24px 16px;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  align-self: flex-start;
}

@media (min-width: 992px) {
  .soq-panel-layout__sidebar {
    display: block;
  }
}

.soq-panel-layout__content {
  flex: 1 1 0%;
  min-width: 0;
  padding: 24px 32px;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  .soq-panel-layout__content {
    padding: 16px 20px;
  }
}

/* ---------- Navbar Breadcrumb (parity with /admin) ---------- */
.soq-panel-nav-breadcrumb {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soq-panel-nav-breadcrumb__parents {
  flex-shrink: 0;
}

.soq-panel-nav-breadcrumb__item {
  display: inline-flex !important;
  align-items: center !important;
}

.soq-panel-nav-breadcrumb__link {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-secondary, #64748B) !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.soq-panel-nav-breadcrumb__link:hover {
  color: var(--brand-navy, #0F1E36) !important;
  text-decoration: underline !important;
}

.soq-panel-nav-breadcrumb__separator {
  color: #CBD5E1 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  margin: 0 8px !important;
  user-select: none;
}

.soq-panel-nav-breadcrumb__current {
  font-family: var(--font-sans, "DM Sans", sans-serif) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--brand-navy, #0F1E36) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 380px;
}

/* ---------- Student Dashboard Layout (Viewport-Friendly 2-Column Grid) ---------- */
.soq-student-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 1100px) {
  .soq-student-dashboard-grid {
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
    align-items: start;
  }
}

.soq-continue-img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.soq-workstation-scroll {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(7, 37, 72, 0.2) transparent;
}


