:root {
  --ink: #07106f;
  --muted: #626b92;
  --line: #dce2f3;
  --paper: #f4f7ff;
  --white: #ffffff;
  --brand: #07106f;
  --brand-2: #111f91;
  --brand-3: #eef2ff;
  --teal: #169b9b;
  --coral: #f06f4f;
  --gold: #f0b429;
  --green: #2d8a55;
  --red: #d84b4b;
  --shadow: 0 22px 50px rgba(7, 16, 111, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(7, 16, 111, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff 0, var(--paper) 42%, #eaf0ff 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(7, 16, 111, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 58px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(7, 16, 111, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.small-label,
.payment-list span,
.mascot-card p,
.brand-panel p,
.mascot-callout span,
.mascot-strip span,
.class-list span,
.catalog-grid span,
.developer-card span,
.kanban span {
  color: var(--muted);
}

.small-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.mobile-item,
.mode-button,
.quick-action,
.icon-button,
.primary-button,
.text-button,
.catalog-grid button,
.developer-card button,
.mini-actions button,
.segmented button,
.prompt-chips button {
  border: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: var(--brand-3);
}

.icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: rgba(7, 16, 111, 0.09);
  font-weight: 800;
}

.side-panel {
  margin-top: auto;
  padding: 16px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.main {
  padding: 26px;
  min-width: 0;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.18;
}

h3 {
  font-size: 0.98rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-switch {
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  background: rgba(7, 16, 111, 0.09);
}

.mode-button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.mode-button.active {
  color: var(--ink);
  background: var(--white);
}

.icon-button,
.primary-button,
.text-button,
.catalog-grid button,
.developer-card button,
.mini-actions button,
.segmented button,
.prompt-chips button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.primary-button {
  color: var(--white);
  background: var(--brand);
  box-shadow: 0 12px 20px rgba(7, 16, 111, 0.18);
}

.text-button {
  color: var(--brand);
  background: var(--brand-3);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.view {
  display: none;
  animation: rise 0.32s ease both;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.focus-panel,
.admin-hero,
.system-flow,
.admin-panel,
.module-panel,
.quick-grid,
.status-strip,
.mascot-guide-panel,
.brand-panel,
.journey-panel,
.payment-panel,
.builder-panel,
.service-catalog,
.video-panel,
.class-list,
.developer-card,
.kanban section,
.prompt-panel,
.ai-output {
  border: 1px solid rgba(7, 16, 111, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.admin-hero {
  min-height: 250px;
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background:
    radial-gradient(circle at 72% 20%, rgba(240, 180, 41, 0.28), transparent 28%),
    linear-gradient(135deg, #07106f, #17279d 56%, #3044c7);
}

.admin-hero p {
  max-width: 640px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.admin-hero .small-label {
  color: rgba(255, 255, 255, 0.66);
}

.admin-mascot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-mascot .panda {
  padding: 8px;
  border: 4px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.sync-stack {
  min-width: 170px;
  display: grid;
  gap: 10px;
}

.sync-stack span {
  min-height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.admin-strip {
  grid-column: 1 / -1;
}

.focus-panel {
  min-height: 220px;
  grid-column: span 1;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background:
    radial-gradient(circle at 82% 20%, rgba(240, 180, 41, 0.22), transparent 26%),
    linear-gradient(135deg, #07106f, #17279d 58%, #3044c7);
  color: var(--white);
  overflow: hidden;
}

.focus-panel p {
  color: rgba(255, 255, 255, 0.76);
  max-width: 440px;
  margin-top: 10px;
}

.focus-panel .small-label {
  color: rgba(255, 255, 255, 0.62);
}

.mascot-hero {
  position: relative;
  min-width: 184px;
  min-height: 166px;
}

.mascot-hero .panda-large {
  margin-left: 8px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
}

.mascot-callout {
  position: absolute;
  right: 0;
  bottom: 0;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.mascot-callout strong {
  font-size: 0.95rem;
}

.panda {
  --panda-size: 92px;
  position: relative;
  display: block;
  width: var(--panda-size);
  height: calc(var(--panda-size) * 1.12);
  flex: 0 0 auto;
  transform-origin: 50% 100%;
  animation: pandaBob 2.4s ease-in-out infinite;
}

.panda-large {
  --panda-size: 128px;
}

.panda-small {
  --panda-size: 88px;
}

.panda-tiny {
  --panda-size: 58px;
}

.panda-float {
  --panda-size: 50px;
}

.panda span,
.panda i {
  position: absolute;
  display: block;
}

.panda-ear {
  top: 4%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: #493b34;
  z-index: 1;
}

.panda-ear.left {
  left: 13%;
}

.panda-ear.right {
  right: 13%;
}

.panda-head {
  top: 5%;
  left: 13%;
  width: 74%;
  height: 58%;
  border: 2px solid rgba(73, 59, 52, 0.1);
  border-radius: 48% 48% 44% 44%;
  background: #fff0d8;
  z-index: 3;
}

.panda-body {
  left: 20%;
  bottom: 6%;
  width: 60%;
  height: 50%;
  border-radius: 48% 48% 42% 42%;
  background: #fff0d8;
  z-index: 0;
}

.eye-patch {
  top: 28%;
  width: 25%;
  height: 28%;
  border-radius: 55% 45% 58% 42%;
  background: #493b34;
  transform: rotate(14deg);
}

.eye-patch.left {
  left: 19%;
}

.eye-patch.right {
  right: 19%;
  transform: rotate(-14deg);
}

.eye-patch i {
  left: 44%;
  top: 42%;
  width: 24%;
  height: 24%;
  border-radius: 50%;
  background: #111820;
  animation: pandaBlink 4.5s ease-in-out infinite;
}

.panda-nose {
  left: 45%;
  top: 52%;
  width: 10%;
  height: 8%;
  border-radius: 50% 50% 58% 58%;
  background: #111820;
}

.panda-mouth {
  left: 43%;
  top: 62%;
  width: 14%;
  height: 9%;
  border-bottom: 2px solid #493b34;
  border-radius: 0 0 999px 999px;
}

.panda-arm {
  top: 51%;
  width: 18%;
  height: 36%;
  border-radius: 999px;
  background: #493b34;
  z-index: 2;
}

.panda-arm.left {
  left: 11%;
  transform: rotate(28deg);
}

.panda-arm.right {
  right: 9%;
  transform-origin: 50% 12%;
  animation: pandaWave 1.6s ease-in-out infinite;
}

.panda-foot {
  bottom: 0;
  width: 25%;
  height: 17%;
  border-radius: 999px;
  background: #493b34;
  z-index: 2;
}

.panda-foot.left {
  left: 18%;
}

.panda-foot.right {
  right: 18%;
}

.panda-admin {
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.16));
}

@keyframes pandaBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes pandaWave {
  0%,
  100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: rotate(-58deg);
  }
}

@keyframes pandaBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@keyframes guideRoam {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  35% {
    transform: translateX(-72px) translateY(-5px);
  }
  70% {
    transform: translateX(-28px) translateY(3px);
  }
}

.quick-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  min-height: 120px;
  padding: 16px;
  border-radius: 8px;
  text-align: left;
  display: grid;
  align-content: space-between;
  color: var(--ink);
  background: #fbfcff;
}

.quick-action small {
  color: var(--muted);
}

.status-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.status-strip article {
  padding: 18px;
  display: grid;
  gap: 6px;
  border-right: 1px solid var(--line);
}

.status-strip article:last-child {
  border-right: 0;
}

.status-strip strong {
  font-size: 1.9rem;
}

.journey-panel,
.payment-panel,
.kerala-panel,
.thoughts-panel,
.mascot-guide-panel,
.brand-panel,
.system-flow,
.admin-panel,
.module-panel,
.builder-panel,
.service-catalog,
.video-panel,
.class-list,
.prompt-panel,
.ai-output {
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.green {
  color: #0a5f5f;
  background: #dff5f5;
}

.amber {
  color: #07106f;
  background: #fff2bf;
}

.red {
  color: #8f2222;
  background: #ffe6e2;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
}

.timeline span {
  position: relative;
  min-height: 54px;
  padding: 12px;
  border-radius: 8px;
  background: #edf1ff;
  color: var(--muted);
  font-weight: 800;
}

.timeline .done {
  color: var(--brand);
  background: #e4e9ff;
}

.timeline .active-step {
  color: var(--white);
  background: var(--brand-2);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(26, 156, 145, 0.22);
  }
}

.payment-list {
  display: grid;
  gap: 10px;
}

.payment-list div,
.move-list div,
.class-list article,
.kanban article {
  min-height: 58px;
  padding: 13px;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  background: #f7f9ff;
}

.mascot-guide-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(7, 16, 111, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.9);
}

.brand-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.brand-panel img {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.brand-panel p {
  margin-top: 6px;
  line-height: 1.5;
}

.mascot-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mascot-card .panda-small {
  padding: 8px;
  border-radius: 8px;
  background: #eef2ff;
  flex: 0 0 auto;
}

.mascot-card p {
  margin-top: 6px;
  line-height: 1.45;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.guide-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--brand-3);
  font-weight: 800;
}

.kerala-panel,
.thoughts-panel {
  padding: 20px;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.district-grid span {
  min-height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-3);
  font-weight: 800;
}

.district-grid .hot {
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.move-list {
  display: grid;
  gap: 10px;
}

.flow-grid,
.module-grid {
  display: grid;
  gap: 12px;
}

.flow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-grid article,
.module-grid article {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  background: #fbfcff;
}

.flow-grid span,
.module-grid span,
.admin-table span,
.admin-table em {
  color: var(--muted);
}

.admin-table {
  display: grid;
  gap: 10px;
}

.admin-table div {
  min-height: 62px;
  padding: 13px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  background: #f7f9ff;
}

.admin-table em {
  justify-self: end;
  font-style: normal;
  font-weight: 800;
}

.split-layout,
.learning-layout,
.ai-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(0, 1.16fr);
  gap: 18px;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-options label {
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbfcff;
  font-weight: 800;
}

.service-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.budget-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.budget-row label {
  font-weight: 800;
}

.budget-row input {
  accent-color: var(--brand);
}

.quote-box {
  margin-top: 18px;
  min-height: 134px;
  padding: 18px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, #07106f, #17279d);
  display: grid;
  gap: 8px;
}

.quote-box strong {
  font-size: 2.2rem;
}

.quote-box p {
  color: rgba(255, 255, 255, 0.76);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catalog-grid article {
  min-height: 170px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  align-content: space-between;
  gap: 10px;
  background: #fbfcff;
}

.catalog-grid button,
.developer-card button,
.mini-actions button {
  color: var(--ink);
  background: var(--brand-3);
}

.video-art {
  min-height: 300px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background:
    linear-gradient(45deg, rgba(240, 180, 41, 0.6), transparent 38%),
    linear-gradient(145deg, #07106f, #2236b4 66%, #eef2ff);
  overflow: hidden;
}

.play-button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font-size: 1.7rem;
  box-shadow: 0 20px 46px rgba(16, 24, 32, 0.24);
}

.class-list {
  display: grid;
  gap: 10px;
}

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

.developer-card {
  min-height: 250px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.avatar {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 900;
}

.avatar.teal {
  background: var(--brand);
}

.avatar.coral {
  background: var(--brand-2);
}

.avatar.gold {
  background: #4b59d6;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.segmented {
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  background: #e9edff;
}

.segmented button {
  min-height: 34px;
  background: transparent;
}

.segmented .selected {
  background: var(--white);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban section {
  min-height: 300px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.prompt-chips button {
  color: var(--ink);
  background: var(--brand-3);
}

.mascot-strip {
  margin-bottom: 16px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbfcff;
}

.mascot-strip .panda-tiny {
  padding: 5px;
  border-radius: 8px;
  background: #eef2ff;
  flex: 0 0 auto;
}

.mascot-strip strong,
.mascot-strip span {
  display: block;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 128px;
  outline: none;
}

textarea:focus {
  border-color: var(--brand);
}

.wide {
  width: 100%;
  margin-top: 12px;
}

.ai-output {
  min-height: 352px;
  display: grid;
  align-content: start;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(7, 16, 111, 0.08), transparent 42%),
    var(--white);
}

.ai-output p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #35424c;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bottom-nav {
  display: none;
}

.floating-mascot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 12;
  min-height: 74px;
  border: 1px solid rgba(7, 16, 111, 0.12);
  border-radius: 18px;
  padding: 10px 18px 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.96)),
    var(--white);
  box-shadow: 0 18px 40px rgba(7, 16, 111, 0.18);
  font-weight: 900;
  overflow: visible;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.floating-mascot .panda-float {
  --panda-size: 56px;
  margin: -4px 0 -4px;
  animation: pandaSleepFloat 3s ease-in-out infinite;
}

.floating-copy {
  min-width: 132px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.floating-copy strong,
.floating-copy small {
  display: block;
}

.floating-copy small {
  color: var(--muted);
  font-weight: 800;
}

.wake-text {
  display: none !important;
}

.floating-mascot:hover .floating-label,
.floating-mascot:focus-visible .floating-label {
  font-size: 0;
}

.floating-mascot:hover .floating-label::after,
.floating-mascot:focus-visible .floating-label::after {
  content: "Ithra is awake";
  font-size: 0.95rem;
}

.sleep-z {
  position: absolute;
  left: 20px;
  top: -22px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.04em;
  opacity: 0.72;
  animation: sleepZ 2.2s ease-in-out infinite;
}

.floating-mascot:not(:hover) .eye-patch i {
  left: 32%;
  top: 48%;
  width: 38%;
  height: 3px;
  border-radius: 999px;
  background: #111820;
  animation: none;
}

.floating-mascot:not(:hover) .panda-arm.right {
  animation: none;
  transform: rotate(34deg);
}

.floating-mascot:hover,
.floating-mascot:focus-visible {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(7, 16, 111, 0.24);
  box-shadow: 0 24px 56px rgba(7, 16, 111, 0.26);
}

.floating-mascot:hover .panda-float,
.floating-mascot:focus-visible .panda-float {
  animation: pandaBob 1.6s ease-in-out infinite;
}

.floating-mascot:hover .panda-arm.right,
.floating-mascot:focus-visible .panda-arm.right {
  animation: pandaWave 1s ease-in-out infinite;
}

.floating-mascot:hover .sleep-z,
.floating-mascot:focus-visible .sleep-z {
  opacity: 0;
  transform: translateY(-8px);
}

.floating-mascot:hover .sleep-text,
.floating-mascot:focus-visible .sleep-text {
  display: none;
}

.floating-mascot:hover .wake-text,
.floating-mascot:focus-visible .wake-text {
  display: block !important;
  color: var(--brand);
}

@keyframes pandaSleepFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(2px) rotate(-9deg);
  }
}

@keyframes sleepZ {
  0%,
  100% {
    transform: translateY(3px) scale(0.94);
    opacity: 0.42;
  }
  50% {
    transform: translateY(-5px) scale(1.04);
    opacity: 0.9;
  }
}

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

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 16px 94px;
  }

  .dashboard-grid,
  .admin-layout,
  .split-layout,
  .learning-layout,
  .ai-layout {
    grid-template-columns: 1fr;
  }

  .developer-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 64px;
    padding: 7px;
    border: 1px solid rgba(7, 16, 111, 0.08);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    z-index: 10;
  }

  .floating-mascot {
    right: 18px;
    bottom: 88px;
  }

  .mobile-item {
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    display: grid;
    place-items: center;
    gap: 2px;
  }

  .mobile-item.active {
    color: var(--ink);
    background: var(--brand-3);
  }

  .mobile-item span {
    font-weight: 900;
  }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(180deg, #ffffff 0, #eef3ff 48%, #f8fbff 100%);
  }

  .app-shell {
    min-height: 100dvh;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid rgba(7, 16, 111, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 34px rgba(7, 16, 111, 0.08);
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-button {
    flex: 1 1 0;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .text-button,
  .primary-button,
  .icon-button {
    min-height: 38px;
    padding: 0 10px;
  }

  .icon-button {
    width: 38px;
  }

  .focus-panel {
    min-height: auto;
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .focus-panel h2,
  .admin-hero h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
    line-height: 1.08;
  }

  .focus-panel p,
  .admin-hero p {
    line-height: 1.58;
  }

  .mascot-hero {
    min-height: 132px;
  }

  .panda-large {
    --panda-size: 104px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-action {
    min-height: 104px;
    padding: 14px;
  }

  .status-strip,
  .flow-grid,
  .module-grid,
  .brand-panel,
  .service-options,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-mascot,
  .mascot-guide-panel,
  .mascot-card {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .guide-actions {
    justify-content: stretch;
  }

  .guide-actions button {
    flex: 1 1 100%;
  }

  .mascot-hero {
    min-width: 100%;
  }

  .admin-table div {
    grid-template-columns: 1fr;
  }

  .admin-table em {
    justify-self: start;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .status-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-strip article:last-child {
    border-bottom: 0;
  }

  .budget-row {
    grid-template-columns: 1fr;
  }

  .builder-panel,
  .service-catalog,
  .video-panel,
  .class-list,
  .prompt-panel,
  .ai-output,
  .admin-hero,
  .system-flow,
  .admin-panel,
  .module-panel {
    padding: 16px;
  }

  .catalog-grid article {
    min-height: 138px;
  }

  .floating-mascot {
    right: 14px;
    bottom: 84px;
    min-height: 62px;
    padding: 8px 12px 8px 8px;
    border-radius: 14px;
  }

  .floating-mascot .panda-float {
    --panda-size: 46px;
  }

  .floating-copy {
    min-width: 104px;
  }

  .bottom-nav {
    border-radius: 14px;
  }

  .mobile-item small {
    font-size: 0.7rem;
  }
}

.quick-action,
.catalog-grid article,
.service-options label {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.quick-action:hover,
.catalog-grid article:hover,
.service-options label:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(7, 16, 111, 0.12);
}
