:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --panel: rgba(255, 253, 247, 0.86);
  --panel-solid: #fffdf7;
  --panel-soft: rgba(248, 251, 244, 0.9);
  --line: rgba(79, 94, 87, 0.16);
  --line-strong: rgba(79, 94, 87, 0.27);
  --text: #22312d;
  --muted: #65736d;
  --soft: #3f514a;
  --accent: #3f8f84;
  --accent-2: #d97954;
  --accent-3: #5a95c8;
  --good: #348f64;
  --warn: #c98226;
  --danger: #c95361;
  --shadow: 0 22px 60px rgba(57, 70, 63, 0.14);
  --shadow-soft: 0 12px 30px rgba(57, 70, 63, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.38), rgba(255, 253, 247, 0.2) 42%, rgba(255, 253, 247, 0.34)),
    linear-gradient(180deg, rgba(255, 253, 247, 0.2), rgba(250, 244, 232, 0.58)),
    url("assets/studyops-light-command-bg.png") center / cover no-repeat;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(90, 149, 200, 0.15), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(217, 121, 84, 0.11), transparent 24%),
    linear-gradient(180deg, transparent, rgba(247, 242, 232, 0.62));
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(63, 143, 132, 0.28);
  border-radius: 6px;
  background: #f7fbf7;
  color: var(--text);
  cursor: pointer;
  font-weight: 640;
  line-height: 1.2;
  padding: 0 14px;
  box-shadow: 0 4px 12px rgba(64, 90, 82, 0.05);
}

button:hover,
button:focus-visible {
  border-color: rgba(63, 143, 132, 0.58);
  background: #edf7f3;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(63, 143, 132, 0.7);
  box-shadow: 0 0 0 3px rgba(63, 143, 132, 0.12);
}

textarea {
  resize: vertical;
}

label,
.field-group {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.field-label {
  color: var(--muted);
}

.field-hint {
  display: block;
  color: #74827b;
  font-size: 0.82rem;
  font-weight: 520;
  line-height: 1.45;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.76);
  backdrop-filter: blur(18px);
  padding: 24px 18px;
  transition: padding 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 760;
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.sidebar-toggle {
  position: absolute;
  top: 30px;
  right: 14px;
  width: 34px;
  min-height: 30px;
  border-color: rgba(63, 143, 132, 0.22);
  background: rgba(255, 255, 255, 0.76);
  color: #436059;
  font-size: 0.78rem;
  padding: 0;
  z-index: 2;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 11px;
  margin-top: 34px;
}

.nav-list button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  color: #465650;
  text-align: left;
  padding: 0 14px;
  overflow: hidden;
  box-shadow: none;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-list button::before {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(63, 143, 132, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #5b6d66;
  content: attr(data-short);
  font-size: 0.78rem;
  font-weight: 820;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-list button::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(226, 249, 241, 0.9), rgba(255, 246, 236, 0.88));
  content: "";
  opacity: 0;
  transform: scaleX(0.94);
  transform-origin: left center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-list button:hover,
.nav-list button:focus-visible {
  color: #173b35;
}

.nav-list button:hover::after,
.nav-list button:focus-visible::after {
  opacity: 0.7;
  transform: scaleX(1);
}

.nav-list button.active {
  border-color: rgba(63, 143, 132, 0.34);
  background: transparent;
  color: #173b35;
  box-shadow: var(--shadow-soft);
}

.nav-list button.active::before {
  border-color: transparent;
  background: #2f7f74;
  color: #fffdf7;
  box-shadow: 0 8px 18px rgba(47, 127, 116, 0.22);
}

.nav-list button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 24px 12px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand span,
.app-shell.sidebar-collapsed .backup-panel {
  display: none;
}

.app-shell.sidebar-collapsed .brand img {
  width: 44px;
  height: 44px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  left: 50%;
  right: auto;
  top: 86px;
  transform: translateX(-50%);
}

.app-shell.sidebar-collapsed .nav-list {
  margin-top: 60px;
}

.app-shell.sidebar-collapsed .nav-list button {
  display: grid;
  place-items: center;
  font-size: 0;
  padding: 0;
}

.app-shell.sidebar-collapsed .nav-list button::before {
  width: 38px;
  height: 38px;
  font-size: 0.92rem;
}

.app-shell.sidebar-collapsed .nav-list button::after {
  inset: 2px;
  border-radius: 8px;
}

.backup-panel {
  display: grid;
  gap: 11px;
}

.backup-caption {
  margin: 0 0 2px;
  color: #687870;
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.42;
}

.backup-panel button,
.backup-panel .file-label {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 62px;
  padding: 10px 12px;
  place-items: initial;
  text-align: left;
}

.backup-panel button span,
.backup-panel .file-label span {
  font-size: 0.92rem;
  font-weight: 740;
}

.backup-panel button small,
.backup-panel .file-label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 560;
  line-height: 1.25;
}

.file-label,
.browse-button {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px dashed rgba(217, 121, 84, 0.5);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-weight: 660;
}

.file-label input,
.browse-button input,
.drop-zone input {
  display: none;
}

.workspace {
  min-width: 0;
  padding: 32px clamp(22px, 4vw, 56px) 70px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.topbar > div {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 2.6vw, 2.45rem);
  line-height: 1.08;
}

.view-description {
  max-width: 680px;
  margin: 10px 0 0;
  color: #55665f;
  font-size: 0.96rem;
  font-weight: 560;
  line-height: 1.55;
}

h2 {
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 720;
}

h3 {
  font-size: 1rem;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 226px;
  padding: 11px 13px;
  border-color: var(--line-strong);
  background: rgba(255, 253, 247, 0.83);
  backdrop-filter: blur(16px);
  text-align: left;
}

.profile-chip small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.profile-initial {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7ece5, #f7cfb6);
  color: #1c3631;
  font-weight: 900;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 176px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(255, 253, 247, 0.78), rgba(255, 253, 247, 0.38) 62%, rgba(255, 253, 247, 0.12)),
    rgba(255, 253, 247, 0.28);
  box-shadow: var(--shadow);
  padding: clamp(20px, 2.8vw, 30px);
  backdrop-filter: blur(8px);
}

.hero-copy {
  max-width: 620px;
}

.hero-copy h2 {
  font-size: clamp(1.55rem, 2.9vw, 2.55rem);
  line-height: 1.05;
  font-weight: 720;
}

.hero-copy p:not(.eyebrow) {
  max-width: 580px;
  margin: 10px 0 0;
  color: #4b5c56;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
}

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.flow-strip span {
  border: 1px solid rgba(63, 143, 132, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #405a53;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 680;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.hero-actions button:first-child,
.browse-button,
.auth-form button[type="submit"],
#buildPanicBtn {
  border-color: transparent;
  background: #2f7f74;
  color: #fffdf7;
}

.hero-actions button:first-child:hover,
.browse-button:hover,
.auth-form button[type="submit"]:hover,
#buildPanicBtn:hover {
  background: #256b62;
}

.visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.visual-card {
  --visual-image: url("assets/studyops-light-command-bg.png");
  --visual-position: center;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.26);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.visual-card::before,
.visual-card::after {
  position: absolute;
  inset: 0;
  content: "";
}

.visual-card::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.08), rgba(255, 253, 247, 0.76)),
    var(--visual-image) var(--visual-position) / cover no-repeat;
  transform: scale(1.04);
  transition: transform 180ms ease;
}

.visual-card::after {
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(255, 253, 247, 0.86), rgba(255, 253, 247, 0.24) 56%, rgba(47, 127, 116, 0.08));
}

.visual-card:hover::before {
  transform: scale(1.08);
}

.visual-planner {
  --visual-image: url("assets/studyops-planner-card.png");
  --visual-position: 62% 50%;
}

.visual-cards {
  --visual-image: url("assets/studyops-flashcards-card.png");
  --visual-position: 52% 50%;
}

.visual-deadlines {
  --visual-image: url("assets/studyops-deadlines-card.png");
  --visual-position: 72% 50%;
}

.visual-card strong {
  display: block;
  color: #22312d;
  font-size: 1rem;
  font-weight: 780;
}

.visual-card span:not(.visual-badge) {
  display: block;
  max-width: 260px;
  margin-top: 5px;
  color: #51645d;
  font-size: 0.86rem;
  font-weight: 620;
  line-height: 1.42;
}

.visual-badge {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(47, 127, 116, 0.94), rgba(90, 149, 200, 0.9));
  box-shadow: 0 12px 26px rgba(47, 127, 116, 0.18);
  color: #fffdf7;
  font-size: 0.98rem;
  font-weight: 880;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.stat-card strong {
  display: block;
  margin-top: 13px;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.command-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 136px;
  margin-bottom: 24px;
  border: 1px solid rgba(217, 121, 84, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(255, 245, 230, 0.92), rgba(233, 247, 241, 0.86)),
    rgba(255, 253, 247, 0.82);
  box-shadow: var(--shadow);
  padding: clamp(20px, 2.6vw, 30px);
}

.command-drop h2 {
  font-size: clamp(1.28rem, 1.9vw, 1.8rem);
  font-weight: 760;
}

.command-drop p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.browse-button {
  min-width: 166px;
  border-style: solid;
}

.dragging {
  border-color: var(--accent-2) !important;
  background: #fff2e7 !important;
}

.dashboard-layout,
.split-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(430px, 1.05fr);
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 2vw, 26px);
  backdrop-filter: blur(14px);
}

.panel > label,
.panel > .field-group {
  margin-top: 18px;
}

.panel > .panel-heading + label,
.panel > .panel-heading + .field-group {
  margin-top: 0;
}

.panel > label + button,
.panel > .field-group + button,
.panel > textarea + button,
.panel > input + button {
  margin-top: 20px;
}

.panel-note {
  margin: -4px 0 18px;
  max-width: 700px;
  color: #5b6b64;
  font-size: 0.9rem;
  font-weight: 540;
  line-height: 1.55;
}

.panel-note + .output-box {
  margin-top: 14px;
}

.spacious-panel {
  margin-top: 24px;
}

.mission-panel,
.study-queue-panel {
  min-height: 390px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.title-with-help {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.title-with-help[data-symbol]::before {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(63, 143, 132, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232, 249, 243, 0.96), rgba(255, 247, 236, 0.96));
  color: #2f7f74;
  content: attr(data-symbol);
  font-size: 0.78rem;
  font-weight: 840;
  box-shadow: 0 8px 20px rgba(63, 143, 132, 0.08);
}

.info-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 50%;
  border-color: rgba(63, 143, 132, 0.22);
  background: rgba(255, 255, 255, 0.66);
  color: #547067;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 760;
  box-shadow: none;
}

.info-button::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: min(260px, 70vw);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: var(--shadow-soft);
  color: #40524c;
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.45;
  opacity: 0;
  padding: 10px 11px;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.info-button:hover::after,
.info-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.button-row button {
  min-width: max-content;
  padding-inline: 16px;
  white-space: nowrap;
}

.panel-heading .button-row {
  margin-top: 0;
}

.compact button {
  min-width: 88px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 12px;
}

.quick-actions button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 52px;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.quick-actions button::before {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d97954;
  content: "";
  box-shadow: 0 0 0 5px rgba(217, 121, 84, 0.12);
}

.quick-actions button::after {
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(232, 249, 243, 0.8), rgba(255, 244, 232, 0.82));
  content: "";
  opacity: 0;
  transform: scaleX(0.9);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quick-actions button:hover::after,
.quick-actions button:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.item-list,
.task-list {
  display: grid;
  gap: 14px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.queue-list {
  max-height: 350px;
}

.recent-list {
  max-height: 330px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.item button {
  margin-top: 0;
}

.item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-weight: 690;
}

.item-title span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf7f3;
  color: #23665c;
  font-size: 0.76rem;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-row button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.83rem;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.material-tile {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.material-tile strong {
  display: block;
  font-size: 1.45rem;
}

.material-tile span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 650;
}

.account-status {
  display: grid;
  gap: 14px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  padding: 14px;
}

.status-line strong {
  color: var(--text);
}

.drop-zone {
  min-height: 160px;
  place-items: center;
  border: 1px dashed rgba(217, 121, 84, 0.46);
  border-radius: var(--radius);
  background: rgba(255, 245, 235, 0.72);
  padding: 26px;
  text-align: center;
  cursor: pointer;
}

.drop-zone strong {
  color: var(--text);
}

.drop-zone span {
  color: var(--muted);
  font-weight: 600;
}

.output-box {
  min-height: 380px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--soft);
  padding: 16px;
  font: 0.94rem/1.55 Consolas, "Segoe UI", monospace;
}

.mission-output {
  min-height: 310px;
  font: 0.94rem/1.65 Inter, "Segoe UI", system-ui, sans-serif;
}

.output-box.large {
  min-height: 500px;
}

.task-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  align-items: end;
  margin-bottom: 28px;
}

.task-form label:first-child {
  grid-column: span 2;
}

.task-form button {
  min-width: 140px;
  padding-inline: 18px;
}

.priority-high {
  color: var(--danger);
}

.priority-medium {
  color: var(--warn);
}

.priority-low {
  color: var(--good);
}

.done {
  opacity: 0.58;
  text-decoration: line-through;
}

.quiz-panel {
  min-height: 640px;
}

.quiz-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.35fr) 110px;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px;
}

.quiz-difficulty {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#panicTypeGroup {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.panic-setup-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panic-setup-panel .panel-heading {
  margin-bottom: 0;
}

#buildPanicBtn {
  justify-self: start;
  min-width: 188px;
  margin-top: 4px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
}

.segmented button {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  justify-content: center;
  padding: 0 13px;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.18;
  white-space: normal;
  transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.segmented button::after {
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(232, 249, 243, 0.92), rgba(255, 245, 233, 0.9));
  content: "";
  opacity: 0;
  transform: scaleX(0.72);
  transition: opacity 160ms ease, transform 160ms ease;
}

.segmented button:hover::after,
.segmented button:focus-visible::after {
  opacity: 0.72;
  transform: scaleX(1);
}

.segmented button.active {
  border-color: rgba(63, 143, 132, 0.56);
  background: rgba(255, 255, 255, 0.9);
  color: #173b35;
  box-shadow: inset 0 0 0 1px rgba(63, 143, 132, 0.1), 0 10px 24px rgba(63, 143, 132, 0.08);
}

.segmented button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.quiz-difficulty button[data-quiz-difficulty="easy"].active {
  border-color: rgba(52, 143, 100, 0.5);
  color: #276342;
}

.quiz-difficulty button[data-quiz-difficulty="easy"].active::after {
  background: linear-gradient(90deg, rgba(231, 247, 235, 0.95), rgba(242, 252, 242, 0.92));
}

.quiz-difficulty button[data-quiz-difficulty="medium"].active {
  border-color: rgba(201, 130, 38, 0.5);
  color: #7b531c;
}

.quiz-difficulty button[data-quiz-difficulty="medium"].active::after {
  background: linear-gradient(90deg, rgba(255, 244, 221, 0.96), rgba(255, 250, 236, 0.92));
}

.quiz-difficulty button[data-quiz-difficulty="hard"].active {
  border-color: rgba(201, 83, 97, 0.48);
  color: #883743;
}

.quiz-difficulty button[data-quiz-difficulty="hard"].active::after {
  background: linear-gradient(90deg, rgba(255, 235, 238, 0.96), rgba(255, 246, 243, 0.92));
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(67, 76, 70, 0.34);
  backdrop-filter: blur(12px);
}

.modal-layer[hidden] {
  display: none;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(380px, 1fr);
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow);
}

.auth-visual {
  display: grid;
  align-content: end;
  min-height: 560px;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.18), rgba(255, 253, 247, 0.72)),
    url("assets/studyops-light-command-bg.png") center / cover no-repeat;
}

.auth-visual h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.06;
  font-weight: 760;
}

.auth-visual p:not(.eyebrow) {
  margin: 16px 0 0;
  color: #485b54;
  line-height: 1.55;
}

.auth-status-strip {
  margin-top: 24px;
  border: 1px solid rgba(63, 143, 132, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
  color: var(--soft);
  font-weight: 760;
}

.auth-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-tabs button {
  position: relative;
  isolation: isolate;
  min-height: 38px;
  padding: 0 14px;
  overflow: hidden;
}

.auth-tabs button::after {
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(232, 249, 243, 0.95), rgba(255, 246, 236, 0.92));
  content: "";
  opacity: 0;
  transform: scaleX(0.74);
  transition: opacity 160ms ease, transform 160ms ease;
}

.auth-tabs button.active {
  border-color: rgba(63, 143, 132, 0.52);
  background: rgba(255, 255, 255, 0.9);
  color: #173b35;
}

.auth-tabs button:hover::after,
.auth-tabs button:focus-visible::after,
.auth-tabs button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.auth-form,
.verify-panel {
  display: none;
  gap: 14px;
}

.auth-form.active,
.verify-panel:not([hidden]) {
  display: grid;
}

.mail-card {
  border: 1px solid rgba(90, 149, 200, 0.24);
  border-radius: 7px;
  background: #f2f8fd;
  padding: 16px;
  color: #314e66;
  line-height: 1.5;
}

.mail-card strong {
  color: #1e3e58;
}

.account-actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

@media (max-width: 1180px) {
  .stat-row,
  .quick-actions,
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-layout,
  .dashboard-bottom,
  .split-layout,
  .task-form,
  .auth-card {
    grid-template-columns: 1fr;
  }

  .task-form label:first-child {
    grid-column: auto;
  }

  .auth-visual {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-toggle {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar {
    padding: 24px 18px;
  }

  .app-shell.sidebar-collapsed .brand {
    justify-content: flex-start;
  }

  .app-shell.sidebar-collapsed .brand span {
    display: inline;
  }

  .app-shell.sidebar-collapsed .backup-panel {
    display: grid;
  }

  .app-shell.sidebar-collapsed .nav-list {
    margin-top: 34px;
  }

  .app-shell.sidebar-collapsed .nav-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: inherit;
    padding: 0 14px;
    text-align: left;
  }

  .app-shell.sidebar-collapsed .nav-list button::before {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace {
    padding: 22px 16px 50px;
  }

  .topbar,
  .hero-panel,
  .command-drop {
    display: grid;
  }

  .profile-chip,
  .browse-button {
    width: 100%;
  }

  .quick-actions,
  .segmented,
  .quiz-controls,
  .visual-strip,
  .stat-row,
  .material-grid {
    grid-template-columns: 1fr;
  }

  .visual-card {
    min-height: 152px;
  }
}
