/* =========================================================
   LUMYRO v1.2.2
   DESIGN RESCUE
   Custom, but calmer and more premium
========================================================= */

:root {
  --lum-bg: #f5f3ee;
  --lum-surface: #ffffff;
  --lum-surface-soft: #fbfaf7;
  --lum-text: #151515;
  --lum-text-soft: #66645e;
  --lum-text-faint: #8d8a84;
  --lum-border: #e6e1d8;
  --lum-border-strong: #d8d2c7;
  --lum-black: #121212;
  --lum-accent: #d6ff3f;
  --lum-accent-deep: #c2ef21;
  --lum-shadow: 0 10px 30px rgba(18, 18, 18, 0.06);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* =========================================================
   GLOBAL
========================================================= */

html,
body {
  background: var(--lum-bg);
  color: var(--lum-text);
}

body {
  letter-spacing: -0.01em;
}

::selection {
  background: var(--lum-accent);
  color: var(--lum-black);
}

.eyebrow,
.metric-label,
.metric-caption,
.subject-meta-line,
.study-summary-main span,
.study-summary-stat span,
.activity-day-label,
.activity-day-count,
.document-info span,
.sidebar-section-label,
.auth-pill,
.hero-kicker,
.sidebar-brand span {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page {
  max-width: 1400px;
  padding-top: 34px;
  padding-left: 34px;
  padding-right: 34px;
}

/* =========================================================
   LOGO / BRAND
========================================================= */

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--lum-accent);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark.large {
  width: 46px;
  height: 46px;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
  width: 248px;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, #111111 0%, #161616 100%);
  color: white;
  border-right: 1px solid rgba(255,255,255,.06);
}

.main-area {
  margin-left: 248px;
}

.sidebar-brand {
  padding: 4px 8px 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand strong {
  color: #ffffff;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sidebar-brand span {
  color: rgba(255,255,255,.38);
  font-size: 8px;
}

.nav-item {
  min-height: 46px;
  padding: 0 13px;
  border-radius: 12px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: white;
}

.nav-item.active {
  background: var(--lum-accent);
  color: var(--lum-black);
  font-weight: 700;
}

.nav-item.active::after {
  display: none;
}

.sidebar-section-label {
  color: rgba(255,255,255,.24);
  font-size: 8px;
}

.sidebar-module {
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
}

.sidebar-module.active {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.module-icon {
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: white;
}

.sidebar-module strong {
  color: white;
}

.sidebar-module small,
.sidebar-user-copy span {
  color: rgba(255,255,255,.38);
}

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user-copy strong {
  color: white;
}

.sidebar .avatar {
  border-radius: 10px;
  background: var(--lum-accent);
  color: var(--lum-black);
}

.sidebar .icon-button {
  color: rgba(255,255,255,.58);
}

.sidebar .icon-button:hover {
  background: rgba(255,255,255,.06);
  color: #ffffff;
}

/* =========================================================
   TITLES / HEADERS
========================================================= */

.page-header h1,
.subject-header h1 {
  margin-top: 8px;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 780;
  text-transform: none;
}

.page-header p {
  max-width: 520px;
  color: var(--lum-text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.page::before {
  display: none !important;
}

/* =========================================================
   BUTTONS
========================================================= */

.button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--lum-border-strong);
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  transition:
    transform .14s ease,
    background .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    color .14s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--lum-black);
  color: white;
  border-color: var(--lum-black);
  box-shadow: 0 8px 20px rgba(18,18,18,.12);
}

.button-primary:hover:not(:disabled) {
  background: #1d1d1d;
  color: white;
}

.button-secondary {
  background: white;
  color: var(--lum-text);
  border-color: var(--lum-border-strong);
}

.button-secondary:hover:not(:disabled) {
  background: var(--lum-surface-soft);
}

.button-light {
  background: var(--lum-accent);
  color: var(--lum-black);
  border-color: #cbe92d;
}

.button-danger,
.button-danger-soft {
  background: #fff2f1;
  color: #b0443d;
  border-color: #f1d2cf;
}

/* =========================================================
   INPUTS
========================================================= */

.form-group input,
.form-group textarea,
.study-search,
.subject-filter {
  background: white;
  border: 1px solid var(--lum-border);
  border-radius: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #cfd6c0;
  box-shadow: 0 0 0 4px rgba(214,255,63,.22);
}

.study-search {
  box-shadow: none;
}

.study-search input {
  font-size: 12px;
}

/* =========================================================
   HERO
========================================================= */

.hero-dashboard-card {
  position: relative;
  min-height: 250px;
  padding: 34px 36px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at top right, rgba(214,255,63,.12), transparent 26%),
    linear-gradient(135deg, #101010 0%, #161616 55%, #121212 100%);
  box-shadow: 0 16px 34px rgba(0,0,0,.11);
}

.hero-dashboard-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lum-accent) 0%, rgba(214,255,63,0) 70%);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.hero-dashboard-card::after {
  display: none;
}

.hero-dashboard-copy h2 {
  max-width: 760px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 780;
  text-transform: none;
}

.hero-dashboard-copy p {
  max-width: 540px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.66);
  font-family: inherit;
}

.hero-kicker {
  color: var(--lum-accent);
  font-size: 10px;
  margin-bottom: 14px;
}

.hero-ring {
  border-radius: 26px;
  transform: rotate(45deg);
  border: 1px solid rgba(255,255,255,.07);
}

.ring-one {
  width: 210px;
  height: 210px;
  right: 54px;
}

.ring-two {
  width: 136px;
  height: 136px;
  right: 91px;
  top: 21px;
}

.ring-three {
  width: 74px;
  height: 74px;
  right: 122px;
  top: 53px;
  background: var(--lum-accent);
  opacity: 1;
  border: 0;
}

.hero-score {
  right: 129px;
  top: 79px;
  color: var(--lum-black);
  font-weight: 800;
}

/* =========================================================
   CARDS / PANELS
========================================================= */

.panel,
.metric-card,
.mini-metric,
.subject-card,
.analysis-body,
.custom-flashcard,
.session-question,
.upload-panel,
.empty-panel,
.onboarding-card,
.intelligence-stat,
.subject-summary-card {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--lum-border);
  border-radius: 18px;
  box-shadow: var(--lum-shadow);
}

.panel-header {
  border-bottom: 1px solid var(--lum-border);
  padding-bottom: 14px;
}

.panel-header h3 {
  font-size: 20px;
  font-weight: 730;
  letter-spacing: -0.03em;
  text-transform: none;
}

/* =========================================================
   METRICS
========================================================= */

.metric-grid {
  gap: 16px;
  background: transparent;
  border: 0;
}

.metric-card {
  min-height: 130px;
  padding: 18px 20px;
  position: relative;
}

.metric-card::before {
  content: attr(data-index);
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 9px;
  color: #b4b0a8;
  font-family: ui-monospace, monospace;
}

.metric-label {
  color: var(--lum-text-faint);
  font-size: 9px;
}

.metric-value {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 760;
}

.metric-caption {
  font-size: 8px;
  color: var(--lum-text-faint);
}

/* =========================================================
   ONBOARDING
========================================================= */

.onboarding-card {
  padding: 20px 22px;
}

.onboarding-heading h3 {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.onboarding-step {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--lum-border);
}

.onboarding-check {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--lum-border-strong);
  background: white;
}

.onboarding-step.completed .onboarding-check {
  background: var(--lum-accent);
  border-color: #cbe92d;
  color: var(--lum-black);
}

/* =========================================================
   ANALYTICS
========================================================= */

.intelligence-grid {
  gap: 16px;
}

.activity-chart {
  padding-top: 20px;
  border-left: 0;
  border-bottom: 0;
}

.activity-bar {
  width: min(30px, 70%);
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--lum-accent) 0%, #bfd80e 100%);
}

.activity-bar.empty {
  background: #e7e3db;
}

.streak-badge,
.badge {
  border-radius: 999px;
  background: #eff8cc;
  color: #51610d;
  font-size: 9px;
  font-family: ui-monospace, monospace;
}

.intelligence-stat {
  min-height: 95px;
  background: #fff;
}

.intelligence-stat span {
  color: var(--lum-text-faint);
  font-size: 9px;
}

.intelligence-stat strong {
  font-size: 30px;
  font-weight: 760;
  letter-spacing: -0.05em;
}

/* =========================================================
   STUDY SUMMARY
========================================================= */

.study-summary {
  border-radius: 20px;
  background: linear-gradient(135deg, #181818 0%, #242424 100%);
  color: white;
  box-shadow: 0 14px 30px rgba(18,18,18,.12);
}

.study-summary-main span,
.study-summary-stat span {
  color: rgba(255,255,255,.42);
}

.study-summary-divider {
  background: rgba(255,255,255,.12);
}

/* =========================================================
   SUBJECT CARDS
========================================================= */

.subjects-grid {
  gap: 16px;
}

.subject-card {
  min-height: 230px;
  padding: 18px;
  background: white;
  position: relative;
}

.subject-card::after {
  content: "";
}

.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(18,18,18,.10);
  border-color: #d8d2c7;
}

.subject-icon,
.subject-big-icon {
  border-radius: 14px;
  background: #151515;
  color: var(--lum-accent);
  border: 0;
}

.subject-card h3 {
  margin-top: 20px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: -0.04em;
  text-transform: none;
}

.subject-card-description,
.subject-card-stats {
  color: var(--lum-text-soft);
  font-size: 11px;
  font-family: inherit;
}

.subject-card-progress {
  height: 8px;
  background: #ece8df;
  border-radius: 999px;
}

.subject-card-progress > div {
  background: linear-gradient(90deg, var(--lum-accent) 0%, #bfd80e 100%);
  border-radius: 999px;
}

.subject-exam-badge {
  border-radius: 999px;
  background: #eff8cc;
  color: #56650f;
  font-size: 9px;
}

/* =========================================================
   SUBJECT PAGE
========================================================= */

.subject-metrics {
  gap: 16px;
  background: transparent;
  border: 0;
}

.mini-metric {
  padding: 16px 18px;
}

.mini-metric span {
  color: var(--lum-text-faint);
  font-size: 9px;
}

.subject-tabs,
.analysis-tabs {
  gap: 8px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
}

.subject-tab,
.analysis-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--lum-border);
  background: white;
  color: var(--lum-text-soft);
  font-size: 11px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.subject-tab.active,
.analysis-tab.active {
  background: var(--lum-black);
  color: white;
  border-color: var(--lum-black);
  box-shadow: 0 8px 20px rgba(18,18,18,.12);
}

/* =========================================================
   DOCUMENTS / ANALYSIS
========================================================= */

.document-row {
  min-height: 64px;
  border-bottom: 1px solid var(--lum-border);
}

.document-row:hover {
  background: rgba(214,255,63,.09);
}

.document-file-icon,
.activity-item-icon,
.empty-icon,
.upload-icon {
  border-radius: 12px;
  background: #151515;
  color: white;
  border: 0;
}

.small-action {
  border-radius: 10px;
  border: 1px solid var(--lum-border);
  background: white;
  font-size: 10px;
  text-transform: none;
}

.small-action:hover {
  background: var(--lum-surface-soft);
  color: var(--lum-text);
}

.analysis-body {
  background: rgba(255,255,255,.88);
}

.analysis-summary {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.85;
}

.concept-card,
.analysis-list-card {
  border-radius: 14px;
  border: 1px solid var(--lum-border);
  background: white;
}

/* =========================================================
   FLASHCARDS / LEARNING
========================================================= */

.custom-flashcard {
  background: white;
}

.custom-flashcard:hover {
  background: #fcfcf9;
}

.custom-flashcard-divider {
  background: var(--lum-border);
}

.learning-session {
  background: var(--lum-bg);
}

.session-header {
  background: #141414;
  color: white;
}

.session-progress-track {
  background: rgba(255,255,255,.14);
}

.session-progress-bar {
  background: var(--lum-accent);
}

.session-close {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: white;
}

.session-card {
  min-height: 390px;
  background: linear-gradient(135deg, #111111 0%, #171717 100%);
  color: white;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(0,0,0,.11);
}

.session-card-text {
  font-size: clamp(24px, 3.6vw, 42px);
  letter-spacing: -0.04em;
  font-weight: 760;
}

.session-question {
  background: rgba(255,255,255,.84);
}

.session-question h2 {
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 760;
  text-transform: none;
}

.session-question textarea {
  border-radius: 14px;
  background: white;
  border: 1px solid var(--lum-border);
}

.rating-button {
  border-radius: 12px;
  border: 1px solid var(--lum-border);
  background: white;
  text-transform: none;
}

/* =========================================================
   AUTH
========================================================= */

.auth-page {
  grid-template-columns: 1.04fr .96fr;
}

.auth-brand-panel {
  padding: 34px 40px;
  background:
    radial-gradient(circle at top right, rgba(214,255,63,.10), transparent 28%),
    linear-gradient(135deg, #0f0f0f 0%, #171717 100%);
}

.auth-brand-panel::after {
  width: 430px;
  height: 430px;
  right: -140px;
  bottom: -140px;
  border-radius: 60px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 0 0 44px rgba(255,255,255,.018),
    0 0 0 88px rgba(255,255,255,.01);
  transform: rotate(18deg);
}

.auth-brand-content h1 {
  max-width: 640px;
  font-size: clamp(46px, 6vw, 82px);
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-transform: none;
}

.auth-brand-content > p {
  max-width: 470px;
  font-size: 13px;
  line-height: 1.8;
  font-family: inherit;
  color: rgba(255,255,255,.68);
}

.auth-pill {
  border-radius: 999px;
  border: 1px solid rgba(214,255,63,.32);
  color: var(--lum-accent);
  background: rgba(214,255,63,.05);
  font-size: 9px;
}

.auth-feature-list {
  max-width: 530px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.auth-feature {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.auth-feature > span {
  color: var(--lum-accent);
}

.auth-feature strong {
  font-size: 13px;
  letter-spacing: -0.01em;
  text-transform: none;
}

.auth-feature p {
  font-family: inherit;
  font-size: 12px;
  color: rgba(255,255,255,.52);
}

.auth-form-panel {
  background: var(--lum-bg);
  border-left: 1px solid var(--lum-border);
}

.auth-form-panel::before {
  content: "";
}

.auth-heading h2 {
  font-size: clamp(36px, 4vw, 54px);
  line-height: 0.94;
  text-transform: none;
  letter-spacing: -0.05em;
}

.auth-heading p,
.auth-legal {
  font-family: inherit;
  color: var(--lum-text-soft);
}

.auth-switch {
  gap: 6px;
  padding: 4px;
  background: #ece7dd;
  border: 0;
  border-radius: 14px;
}

.auth-switch-button {
  border-radius: 10px;
  text-transform: none;
  font-size: 11px;
  border: 0 !important;
  box-shadow: none;
}

.auth-switch-button.active {
  background: white;
  color: var(--lum-text);
  box-shadow: 0 4px 12px rgba(18,18,18,.08);
}

/* =========================================================
   MODALS / TOASTS
========================================================= */

.modal-backdrop {
  background: rgba(15,15,15,.55);
}

.modal {
  border-radius: 20px;
  border: 1px solid var(--lum-border);
  background: #faf8f3;
  box-shadow: 0 24px 48px rgba(18,18,18,.16);
}

.modal-close {
  border-radius: 10px;
  border: 1px solid var(--lum-border);
  background: white;
}

.modal-header {
  border-bottom: 1px solid var(--lum-border);
}

.toast {
  border-radius: 14px;
  border: 1px solid #d9eaa1;
  background: #f7fddf;
  color: #4e590f;
  box-shadow: 0 10px 26px rgba(18,18,18,.08);
  font-size: 11px;
  text-transform: none;
}

/* =========================================================
   MISC
========================================================= */

.priority-item {
  border-bottom: 1px solid var(--lum-border);
  padding: 14px 6px;
  border-radius: 0;
}

.priority-item:hover {
  background: rgba(214,255,63,.08);
}

.priority-rank {
  border-radius: 10px;
  background: var(--lum-accent);
  color: var(--lum-black);
}

.progress-circle {
  border-radius: 999px;
  transform: none;
}

.progress-circle::after {
  border-radius: 999px;
}

.progress-circle strong {
  transform: none;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  background: #c9c3b9;
  border-radius: 999px;
}

/* =========================================================
   MOBILE
========================================================= */

.mobile-header {
  background: #121212;
  color: white;
  border-bottom: 0;
}

.mobile-header .avatar {
  border-radius: 10px;
  background: var(--lum-accent);
  color: var(--lum-black);
}

@media (max-width: 900px) {
  .main-area {
    margin-left: 0;
  }

  .sidebar {
    width: 248px;
  }

  .page {
    max-width: none;
    padding-left: 22px;
    padding-right: 22px;
    padding-top: 28px;
  }

  .hero-dashboard-card {
    padding: 28px 24px;
  }
}

@media (max-width: 700px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 24px;
  }

  .page-header h1,
  .subject-header h1 {
    font-size: 36px;
  }

  .hero-dashboard-copy h2 {
    font-size: 34px;
  }

  .metric-card {
    min-height: 114px;
  }

  .auth-heading h2 {
    font-size: 34px;
  }

  .auth-brand-content h1 {
    font-size: 48px;
  }
}
