/* StudyConcept dashboard — modern light refinement.
 * This layer keeps the existing dashboard behavior and structure while moving
 * the desktop workspace to a quiet, integrated, warm-white visual system.
 */

@media (min-width: 768px) {
  html {
    background: #f7f7f5;
  }

  body.sc-reference-dashboard,
  body.sc-study-desk[data-sc-sidebar-page="dashboard"],
  body[data-sc-shell="context-lens"][data-sc-navigation-shell="true"] {
    --sc-paper: #f7f7f5;
    --sc-ink: #191919;
    --sc-muted: #6f6f6b;
    --sc-line: #e5e5e2;
    --sc-green: #2383e2;
    --sc-green-dark: #1967b3;
    --sc-mint: #edf6ff;
    --sc-context-height: 4.25rem;
    --sc-context-paper: #f7f7f5;
    --sc-context-ink: #191919;
    --sc-context-muted: #6f6f6b;
    --sc-context-line: #e5e5e2;
    --sc-context-green: #2383e2;
    --sc-context-green-hover: #1b6fc2;
    background: #f7f7f5 !important;
    color: #191919;
  }

  /* One continuous header plane instead of a floating navigation capsule. */
  .sc-context-topbar {
    inset: 0 0 auto !important;
    grid-template-columns: minmax(12rem, 1fr) minmax(19rem, 36rem) minmax(12rem, 1fr);
    height: var(--sc-context-height);
    padding: 0 clamp(1.5rem, 3.25vw, 3.4rem);
    border: 0 !important;
    border-bottom: 1px solid #e5e5e2 !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: none;
    backdrop-filter: blur(16px) saturate(115%);
    font-family: "Inter", system-ui, sans-serif;
  }

  .sc-context-brand {
    gap: 0.58rem;
    color: #191919;
  }

  .sc-context-brand img {
    width: 1.72rem;
    height: 1.72rem;
  }

  .sc-context-brand span {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 720;
    letter-spacing: -0.035em;
  }

  .sc-context-trigger {
    justify-self: center;
    width: min(100%, 36rem);
    min-width: 0;
    min-height: 2.55rem;
    justify-content: flex-start;
    gap: 0.52rem;
    padding: 0.45rem 0.75rem;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #343432;
    font-size: 0.76rem;
    font-weight: 560;
  }

  .sc-context-trigger:hover,
  .sc-context-trigger[aria-expanded="true"] {
    background: #f3f3f1;
    color: #191919;
  }

  .sc-context-trigger i {
    width: 3px;
    height: 3px;
    flex-basis: 3px;
    background: #aaa9a4;
  }

  .sc-context-trigger-chevron {
    margin-left: auto;
    color: #7d7c77;
  }

  .sc-context-trigger-leading {
    width: auto;
    height: auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #7d7c77;
    font-size: 1.05rem !important;
  }

  .sc-context-trigger-path {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
  }

  .sc-context-mode {
    margin-left: 0.2rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #7d7c77;
    font-size: 0.66rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .sc-context-actions {
    gap: 0.3rem;
  }

  .sc-context-sync {
    display: none;
  }

  .sc-context-lyne {
    min-width: auto;
    min-height: 2.4rem;
    padding: 0 0.7rem;
    border-color: transparent;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 620;
  }

  .sc-context-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 7px;
  }

  .sc-context-profile {
    min-height: 2.45rem;
    padding: 0.2rem 0.3rem 0.2rem 0.22rem;
    border-radius: 7px;
    font-weight: 560;
  }

  .sc-context-lyne:hover,
  .sc-context-icon:hover,
  .sc-context-profile:hover {
    border-color: transparent;
    background: #f3f3f1;
  }

  .sc-context-avatar {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.64rem;
  }

  .sc-context-lens-panel {
    top: calc(100% + 0.25rem);
    border-color: #dededb;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(20, 20, 18, 0.12), 0 2px 8px rgba(20, 20, 18, 0.05);
  }

  html body[data-sc-shell="context-lens"][data-sc-navigation-shell="true"] main[data-sidebar-main] {
    padding-top: calc(var(--sc-context-height) + 1.65rem) !important;
  }

  .sc-dashboard-main {
    width: min(calc(100% - 6rem), 90rem);
    padding: 0 0 3.5rem;
  }

  .sc-dashboard-welcome {
    margin-bottom: 1.45rem;
  }

  .sc-dashboard-welcome h1 {
    color: #191919;
    font-size: clamp(2.25rem, 3vw, 3.15rem);
    font-weight: 700;
    letter-spacing: -0.055em;
  }

  .sc-dashboard-welcome > div:first-child > p,
  .sc-dashboard-welcome > div:first-child > span {
    color: #747470;
  }

  .sc-welcome-metrics {
    gap: 0.7rem;
  }

  .sc-streak-metric,
  .sc-weekly-metric {
    border-color: #e2e2df;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
  }

  .sc-dashboard-grid {
    grid-template-columns: 1fr 1fr 1.12fr;
    gap: 1.15rem;
  }

  .sc-next-action,
  .sc-today-card,
  .sc-courses-card,
  .sc-review-card,
  .sc-lyne-card,
  .sc-quick-create {
    border-color: #e2e2df;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
  }

  .sc-next-action {
    padding: 1.35rem 1.45rem 1rem;
  }

  .sc-next-action::after,
  body[data-dashboard-empty="true"] .sc-next-action::after {
    display: none;
  }

  .sc-desk-workspace__kicker {
    min-height: auto;
    margin-bottom: 2rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #2383e2;
    letter-spacing: 0.15em;
  }

  .sc-desk-workspace__title-wrap h2 {
    color: #191919;
    font-size: clamp(1.9rem, 2.45vw, 2.55rem);
    font-weight: 680;
  }

  .sc-desk-resume,
  .sc-today-card .sc-desk-timeline-empty__actions a:last-child,
  .sc-lyne-actions button:first-child {
    border-color: #2383e2;
    border-radius: 7px;
    background: #2383e2;
    box-shadow: none;
  }

  .sc-desk-resume:hover,
  .sc-today-card .sc-desk-timeline-empty__actions a:last-child:hover,
  .sc-lyne-actions button:first-child:hover {
    background: #1b6fc2;
  }

  .sc-desk-view-tabs {
    gap: 0.75rem;
  }

  .sc-desk-view-tabs button {
    padding: 0 0.2rem;
    border-radius: 0;
  }

  .sc-desk-view-tabs button[aria-selected="true"] {
    border-bottom: 1px solid #2383e2;
    background: transparent;
  }

  .sc-next-action .sc-desk-memory-item,
  .sc-next-action .sc-desk-panel-section {
    border-color: #e3e3e0;
    border-radius: 8px;
    background: #fbfbfa;
    box-shadow: none;
  }

  .sc-lyne-message {
    border-color: #dce9f6;
    border-radius: 8px;
    background: #f7f8f7;
  }

  .sc-review-card[data-empty="true"]::after,
  .sc-next-action .sc-desk-empty-focus {
    border-color: #e4e4e1;
    background: #fafaf9;
  }

  .sc-courses-card .sc-desk-course:hover,
  .sc-quick-create a:hover {
    background: #f7f7f5;
  }

  .sc-quick-create {
    margin-top: 1.15rem;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .sc-context-topbar {
    grid-template-columns: auto minmax(14rem, 1fr) auto;
    padding-inline: 1rem;
  }

  .sc-dashboard-main {
    width: min(calc(100% - 2rem), 90rem);
  }
}
