:root {
  --sidebar: #0d5b34;
  --sidebar-deep: #064527;
  --mint: #bcebdd;
  --mint-strong: #80d6bf;
  --mint-dark: #1f6c5b;
  --paper: rgba(239, 255, 250, 0.86);
  --ink: #10231c;
  --muted: #49675d;
  --line: rgba(46, 120, 96, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 16%, rgba(125, 219, 197, 0.42), transparent 28%),
    linear-gradient(135deg, #f3fffb 0%, #e7fbf6 47%, #fffaf0 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-screen {
  display: none;
}

.app-screen.is-active {
  display: block;
}

button {
  font: inherit;
}

.sidebar {
  width: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 18px 16px;
  color: #ecfff8;
  background:
    radial-gradient(circle at 64% 68%, rgba(43, 145, 89, 0.44), transparent 25%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
}

.brand {
  border: 0;
  color: inherit;
  background: transparent;
  padding-top: 2px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.create-btn {
  width: fit-content;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.create-btn.active,
.create-btn.active-create {
  background: linear-gradient(135deg, #ff9b68, #ff6a4a);
}

.nav {
  display: grid;
  gap: 12px;
}

.nav a,
.settings-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 8px;
  color: inherit;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.nav a.active,
.settings-link.active {
  color: #0c4b2c;
  background: linear-gradient(135deg, #c8f8df, #9be7ca);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.nav span,
.settings-link span {
  width: 22px;
  text-align: center;
}

.settings-link {
  margin-top: auto;
}

.page {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.assignment {
  padding: 24px 26px 34px;
}

.assignment-head {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto auto;
  align-items: start;
  gap: 24px;
  margin-bottom: 22px;
}

.assignment-picker {
  display: grid;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

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

.assignment-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(31, 108, 91, 0.18);
  border-radius: 999px;
  color: #246756;
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.assignment-tabs button.active {
  color: #083f34;
  background: linear-gradient(135deg, #c8f7e8, #8fdcc8);
  box-shadow: 0 8px 16px rgba(35, 127, 101, 0.16);
}

time {
  padding-top: 6px;
  font-size: 24px;
  font-weight: 900;
}

.back-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #61c8b3;
  background: transparent;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.back-btn.small {
  width: 30px;
  height: 30px;
  color: #176655;
  font-size: 25px;
}

.primary-check {
  min-width: 126px;
  min-height: 52px;
  margin-top: 2px;
  border: 0;
  border-radius: 8px;
  color: #0b463a;
  background: linear-gradient(135deg, #a9ead6, #76cfb6);
  box-shadow: 0 10px 22px rgba(38, 134, 110, 0.2);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.student-management {
  padding: 30px 32px 40px;
}

.student-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.student-management-head p {
  margin: 0 0 5px;
  color: #4d786b;
  font-size: 15px;
  font-weight: 900;
}

.student-management-head h1 {
  margin: 0;
  color: #163e34;
  font-size: 28px;
}

.add-student,
.select-all-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(31, 108, 91, 0.18);
  border-radius: 999px;
  color: #145d4d;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(31, 108, 91, 0.1);
  cursor: pointer;
}

.select-all-btn {
  min-width: 104px;
  color: #fff;
  background: linear-gradient(135deg, #37b995, #1b806d);
}

.student-manage-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(280px, 330px);
  gap: 24px;
  align-items: start;
}

.student-candy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(142px, 1fr));
  gap: 18px;
}

.candy-card {
  position: relative;
  min-height: 184px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  padding: 22px 16px 18px;
  border: 1px solid rgba(35, 113, 91, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 227, 244, 0.58), transparent 27%),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(45, 104, 88, 0.11);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.candy-card.selected {
  border-color: rgba(222, 59, 141, 0.46);
  box-shadow: 0 16px 30px rgba(222, 59, 141, 0.14);
  transform: translateY(-2px);
}

.candy-card.just-granted {
  animation: candyPop 500ms ease;
}

@keyframes candyPop {
  0% {
    transform: translateY(-2px) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.04);
  }
  100% {
    transform: translateY(-2px) scale(1);
  }
}

.rank {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #5e7488;
  background: #e9f2f8;
  font-size: 12px;
  font-weight: 900;
}

.student-face {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 31px;
}

.student-face.rainbow,
.student-face.book {
  background: #fff7b8;
}

.student-face.star,
.student-face.music {
  background: #d8f8e8;
}

.student-face.rocket,
.student-face.ball {
  background: #ffe8c7;
}

.student-face.balloon,
.student-face.flower {
  background: #dff2ff;
}

.student-face.art,
.student-face.gem {
  background: #f1e4ff;
}

.candy-card strong {
  font-size: 18px;
}

.pick-student {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(222, 59, 141, 0.16);
  border-radius: 999px;
  color: #de3b8d;
  background: #fff6fb;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.candy-card.selected .pick-student {
  color: #fff;
  background: linear-gradient(135deg, #ff7abf, #de3b8d);
}

.candy-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #de3b8d;
  background: #fff4fb;
  font-size: 18px;
  font-weight: 900;
}

.candy-total img {
  width: 34px;
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(125, 45, 91, 0.18));
}

.coupon-builder {
  padding: 30px 32px 42px;
}

.coupon-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
  padding: 24px 26px;
  border: 1px solid rgba(222, 59, 141, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 204, 232, 0.48), transparent 24%),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 36px rgba(41, 103, 85, 0.12);
}

.coupon-hero h1 {
  margin: 0;
  color: #153e34;
  font-size: 31px;
}

.coupon-hero p {
  margin: 7px 0 0;
  color: #4d756b;
  font-size: 17px;
  font-weight: 800;
}

.coupon-rule {
  min-width: 220px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 20px;
  color: #de3b8d;
  background: #fff1f8;
  box-shadow: inset 0 0 0 1px rgba(222, 59, 141, 0.1);
  font-weight: 900;
}

.coupon-rule img {
  width: 46px;
  filter: drop-shadow(0 4px 5px rgba(125, 45, 91, 0.18));
}

.coupon-rule strong {
  font-size: 23px;
}

.coupon-rule span {
  color: #253c35;
  font-size: 17px;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.coupon-card {
  position: relative;
  min-height: 166px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px 14px;
  border: 1px solid rgba(38, 121, 96, 0.12);
  border-radius: 20px;
  color: #162e27;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 223, 241, 0.72), transparent 31%),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(42, 101, 84, 0.1);
  cursor: pointer;
  opacity: 0.68;
  filter: saturate(0.72);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.coupon-card:hover {
  opacity: 0.86;
  filter: saturate(0.9);
}

.coupon-card.active {
  transform: translateY(-3px);
  border-color: rgba(222, 59, 141, 0.38);
  box-shadow: 0 18px 34px rgba(222, 59, 141, 0.13);
  opacity: 1;
  filter: saturate(1);
}

.coupon-card.active::after {
  content: "선택됨";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #de3b8d;
  font-size: 11px;
  font-weight: 900;
}

.coupon-step {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: #de3b8d;
  background: #fff0f8;
  font-size: 13px;
  font-weight: 900;
}

.coupon-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff8c8, #ffd7ed);
  font-size: 34px;
  box-shadow: inset 0 -8px 18px rgba(222, 59, 141, 0.12);
}

.coupon-card strong {
  font-size: 18px;
}

.coupon-name-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #162e27;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  outline: none;
}

.coupon-name-input:focus {
  border-color: rgba(222, 59, 141, 0.36);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 190, 224, 0.28);
}

.settings-page {
  padding: 30px 32px 42px;
}

.settings-page h1 {
  margin: 0 0 18px;
  color: #132c35;
  font-size: 30px;
}

.settings-card {
  border: 1px solid rgba(34, 92, 113, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 8%, rgba(180, 238, 224, 0.34), transparent 26%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 36px rgba(42, 94, 111, 0.1);
}

.class-card {
  margin-bottom: 18px;
  padding: 20px 24px;
}

.roster-card {
  overflow: hidden;
  padding: 0 0 20px;
}

.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-card-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9fbf5;
}

.class-form {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(110px, 160px) minmax(170px, 1fr);
  gap: 14px;
  align-items: end;
}

.class-form label {
  display: grid;
  gap: 6px;
  color: #4f636b;
  font-size: 13px;
  font-weight: 900;
}

.class-form input,
.roster-row input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(54, 104, 119, 0.17);
  border-radius: 8px;
  color: #172c35;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.class-form button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #083f55, #0d6f73);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.roster-title {
  margin: 0;
  padding: 20px 24px 14px;
}

.roster-title p {
  margin: 0;
  color: #ba5d45;
  font-size: 14px;
  font-weight: 900;
}

.student-roster {
  margin: 0 24px;
  overflow: hidden;
  border: 1px solid rgba(54, 104, 119, 0.1);
  border-radius: 14px;
  background: #fff;
}

.roster-row {
  display: grid;
  grid-template-columns: 86px minmax(180px, 1fr) minmax(160px, 0.8fr) 78px;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 6px 14px;
  border-bottom: 1px solid #e9eff2;
}

.roster-row:last-child {
  border-bottom: 0;
}

.roster-head {
  min-height: 42px;
  color: #263d45;
  background: linear-gradient(180deg, #fff3d8, #ffe4aa);
  font-size: 14px;
  font-weight: 900;
}

.number {
  width: 54px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f7fafc;
  font-weight: 900;
}

.roster-row input {
  text-align: left;
  padding: 0 12px;
}

.muted-code {
  color: #7d8d95;
  font-size: 14px;
  font-weight: 800;
}

.roster-row button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 0;
  border-radius: 10px;
  background: #f3f7f9;
  cursor: pointer;
}

.settings-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.settings-actions button {
  min-width: 138px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}

.settings-actions .ghost {
  color: #455b63;
  background: #dfe8ed;
}

.settings-actions .save {
  color: #fff;
  background: linear-gradient(135deg, #ffbe2e, #ff9800);
}

.assignment-create {
  padding: 30px 32px 42px;
}

.assignment-create h1 {
  margin: 0 0 20px;
  color: #132c35;
  font-size: 30px;
}

.create-form {
  max-width: 860px;
  display: grid;
  gap: 18px;
}

.create-panel {
  padding: 24px;
  border: 1px solid rgba(34, 92, 113, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(180, 238, 224, 0.36), transparent 26%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 36px rgba(42, 94, 111, 0.1);
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  width: 100%;
}

.field span {
  color: #243a42;
  font-size: 15px;
  font-weight: 900;
}

.field b {
  color: #ff5f57;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(54, 104, 119, 0.15);
  border-radius: 10px;
  color: #172c35;
  background: #fff;
  font: inherit;
  font-weight: 750;
  outline: none;
}

.field input {
  min-height: 44px;
  padding: 0 14px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(20, 135, 111, 0.38);
  box-shadow: 0 0 0 4px rgba(128, 214, 191, 0.18);
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.check-row {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #4f636b;
  font-size: 14px;
  font-weight: 850;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: #1b806d;
}

.description-panel {
  padding-bottom: 18px;
}

.editor-toolbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(54, 104, 119, 0.12);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f8fbfc;
}

.editor-toolbar button {
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  color: #4a5e66;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: #e7f3f0;
}

.field textarea {
  min-height: 154px;
  padding: 14px;
  resize: vertical;
  border-radius: 0 0 10px 10px;
}

.field small {
  justify-self: end;
  color: #80919a;
  font-size: 12px;
  font-weight: 800;
}

.create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.create-actions button {
  min-width: 128px;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  font-weight: 900;
  cursor: pointer;
}

.create-actions .ghost {
  color: #455b63;
  background: #dfe8ed;
}

.create-actions .save {
  color: #fff;
  background: linear-gradient(135deg, #ffbe2e, #ff9800);
  box-shadow: 0 10px 18px rgba(255, 152, 0, 0.2);
}

.dashboard {
  padding: 30px 32px 42px;
}

.dashboard h2,
.class-praise h2 {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid #ff9600;
  color: #172c35;
  font-size: 20px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.dashboard-stat {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border: 1px solid rgba(34, 92, 113, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 24px rgba(46, 94, 111, 0.08);
}

.stat-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}

.stat-icon.blue {
  color: #157b9a;
  background: #dff6ff;
}

.stat-icon.green {
  color: #0a9b57;
  background: #dcffe9;
}

.stat-icon.red {
  color: #c84545;
  background: #ffe2e2;
}

.dashboard-stat small {
  display: block;
  margin-bottom: 4px;
  color: #6d838c;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-stat strong {
  font-size: 25px;
}

.dashboard-table {
  margin-bottom: 22px;
  padding: 22px 30px 18px;
  border: 1px solid rgba(34, 92, 113, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 24px rgba(46, 94, 111, 0.08);
}

.dashboard-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-table th,
.dashboard-table td {
  height: 56px;
  border-bottom: 1px solid #e9f0f3;
  text-align: left;
  font-size: 15px;
}

.dashboard-table th {
  color: #536b74;
  font-size: 14px;
}

.dashboard-table th:nth-child(1),
.dashboard-table td:nth-child(1) {
  width: 20%;
}

.dashboard-table th:nth-child(2),
.dashboard-table td:nth-child(2) {
  width: 32%;
}

.dashboard-table th:nth-child(3),
.dashboard-table td:nth-child(3) {
  width: 18%;
}

.dashboard-table th:nth-child(4),
.dashboard-table td:nth-child(4) {
  width: 30%;
}

.fruit {
  margin-right: 12px;
  font-size: 26px;
}

.submit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 900;
}

.submit-badge.done {
  color: #07853b;
  background: #dbffe7;
}

.submit-badge.pending {
  color: #916c00;
  background: #fff4ba;
}

.file-chip,
.file-doc {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-right: 7px;
  border-radius: 6px;
  background: #dce6ed;
}

.file-doc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-top: 11px solid #fff;
  border-left: 11px solid transparent;
}

.submission-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  margin-right: 6px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.submission-label.text {
  color: #2b6678;
  background: #e3f6ff;
}

.submission-label.image {
  color: #8e4a8f;
  background: #ffe8fb;
}

.submission-label img {
  width: 22px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(83, 48, 83, 0.14);
}

.submission-thumb {
  width: 46px;
  height: 34px;
  margin-right: 8px;
  border: 1px solid rgba(92, 124, 134, 0.16);
  border-radius: 8px;
  object-fit: cover;
  background: #fff8ef;
  box-shadow: 0 5px 10px rgba(42, 94, 111, 0.12);
  vertical-align: middle;
}

.submission-files {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.submission-thumb-button,
.submission-more {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(92, 124, 134, 0.16);
  border-radius: 8px;
  background: #f7fafc;
  box-shadow: 0 5px 10px rgba(42, 94, 111, 0.12);
  cursor: pointer;
}

.submission-thumb-button:hover,
.submission-more:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 108, 91, 0.32);
}

.submission-thumb-button .submission-thumb {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.submission-more {
  color: #425765;
  font-size: 13px;
  font-weight: 900;
}

.empty-submission {
  color: #8fa1aa;
  font-weight: 900;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.preview-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 35, 29, 0.58);
  cursor: pointer;
}

.preview-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  max-height: 88vh;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid rgba(255, 171, 217, 0.34);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 60px rgba(5, 46, 34, 0.28);
}

.preview-title {
  padding-right: 42px;
  color: #173a48;
  font-size: 18px;
}

.preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #173a48;
  background: #e9f5f1;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.preview-image {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 16px;
  background: #f8fbfc;
}

.view-all {
  display: block;
  margin: 18px auto 0;
  border: 0;
  color: #314750;
  background: transparent;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.class-praise {
  padding-top: 2px;
}

.praise-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.praise-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  color: #de3b8d;
  background: rgba(255, 244, 251, 0.9);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(222, 59, 141, 0.08);
}

.praise-summary img {
  width: 38px;
}

.praise-summary span {
  color: #324a43;
  font-size: 14px;
}

.coupon-progress {
  padding: 14px 0 2px;
}

.progress-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), rgba(62, 93, 103, 0.12) calc(5% - 1px) 5%),
    #dceaf0;
}

.progress-fill {
  display: block;
  width: 34.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9100, #ffbf43, #ff6fae);
  box-shadow: 0 8px 18px rgba(255, 145, 0, 0.22);
}

.progress-milestones {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  color: #22343b;
  font-size: 12px;
  font-weight: 900;
}

.progress-milestones span {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(44, 106, 93, 0.08);
  text-align: center;
}

.coupon-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.coupon-status article {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 18px;
  border: 1px solid rgba(34, 92, 113, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.coupon-status strong {
  color: #de3b8d;
  font-size: 23px;
}

.coupon-status span {
  color: #48615b;
  font-size: 14px;
  font-weight: 800;
}

.candy-grant-popup {
  position: sticky;
  top: 22px;
  padding: 22px 20px;
  border: 1px solid rgba(222, 59, 141, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 205, 232, 0.52), transparent 28%),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 22px 48px rgba(58, 105, 91, 0.18);
  backdrop-filter: blur(10px);
}

.candy-grant-popup h2 {
  margin: 0;
  color: #153e34;
  text-align: center;
  font-size: 24px;
}

.candy-grant-popup p {
  width: fit-content;
  margin: 10px auto 18px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #de3b8d;
  background: #fff0f8;
  font-size: 15px;
  font-weight: 900;
}

.grant-options {
  display: grid;
  gap: 12px;
}

.grant-options button {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(222, 59, 141, 0.14);
  border-radius: 18px;
  color: #222f2b;
  background: #fff8fc;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(222, 59, 141, 0.08);
}

.grant-options button:hover {
  transform: translateY(-1px);
}

.grant-options img,
.mini-candy-pair,
.mini-candy-three {
  width: 54px;
}

.grant-options img {
  height: auto;
}

.mini-candy-pair,
.mini-candy-three {
  position: relative;
  min-height: 36px;
  display: block;
}

.mini-candy-pair img,
.mini-candy-three img {
  position: absolute;
  top: 4px;
  width: 38px;
}

.mini-candy-pair img:first-child,
.mini-candy-three img:first-child {
  left: 0;
}

.mini-candy-pair img:last-child {
  left: 18px;
}

.mini-candy-three img:nth-child(2) {
  left: 13px;
  top: 0;
}

.mini-candy-three img:nth-child(3) {
  left: 26px;
}

.student-section h2 {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 5px solid #81d6c3;
  font-size: 18px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: start;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 18px;
}

.student-card {
  position: relative;
  min-height: 122px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(65, 149, 127, 0.24);
  border-radius: 7px;
  background:
    radial-gradient(105px 80px at 98% 8%, rgba(198, 255, 239, 0.75), transparent 58%),
    linear-gradient(135deg, rgba(127, 211, 190, 0.96), rgba(157, 229, 210, 0.88));
  box-shadow: 0 10px 22px rgba(31, 108, 91, 0.1);
  cursor: pointer;
}

.student-card.selected {
  border-color: rgba(222, 59, 141, 0.42);
  box-shadow: 0 16px 30px rgba(222, 59, 141, 0.14);
  transform: translateY(-2px);
}

.student-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(58, 171, 155, 0.45);
}

.student-card strong,
.student-card span,
.student-card button {
  position: relative;
  z-index: 1;
}

.student-card strong {
  font-size: 17px;
}

.student-card span {
  text-align: center;
  font-size: 17px;
  font-weight: 900;
}

.student-card span.submitted {
  width: fit-content;
  justify-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  color: #07853b;
  background: #dbffe7;
  font-size: 14px;
}

.student-card button {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  align-self: end;
  border: 1px solid rgba(29, 99, 82, 0.25);
  border-radius: 999px;
  color: #1e6657;
  background: rgba(238, 255, 250, 0.82);
  font-size: 16px;
  cursor: pointer;
}

.feedback-card {
  padding: 18px 22px 20px;
  border: 1px solid rgba(76, 151, 132, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(172, 239, 223, 0.78), transparent 28%),
    rgba(239, 255, 250, 0.8);
  box-shadow: 0 20px 46px rgba(28, 108, 88, 0.16);
  backdrop-filter: blur(10px);
}

.feedback-top {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 18px;
}

.submission-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.submission-item {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.submission-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(65, 94, 86, 0.14);
  background-color: #f7f1e8;
  box-shadow: 0 7px 15px rgba(35, 83, 70, 0.12);
}

.submission-preview::before,
.submission-preview::after {
  content: "";
  display: block;
}

.submission-preview::before {
  height: 38%;
  margin: 11% 10% 5%;
  border-radius: 4px;
  background:
    linear-gradient(#f9c5c5, #f9c5c5) 0 0 / 44% 6px no-repeat,
    linear-gradient(#d7ead9, #d7ead9) 0 15px / 72% 12px no-repeat,
    linear-gradient(#ead9bd, #ead9bd) 0 36px / 58% 8px no-repeat,
    linear-gradient(90deg, transparent 0 18%, #d9c5a6 18% 22%, transparent 22% 48%, #d9c5a6 48% 52%, transparent 52%);
  opacity: 0.95;
}

.submission-preview::after {
  height: 28%;
  margin: 0 10%;
  border-radius: 4px;
  background:
    linear-gradient(#d5ecf0, #d5ecf0) 0 0 / 100% 10px no-repeat,
    linear-gradient(#ead9bd, #ead9bd) 0 22px / 70% 7px no-repeat,
    linear-gradient(#ead9bd, #ead9bd) 0 38px / 50% 7px no-repeat,
    linear-gradient(135deg, transparent 44%, #9b8f84 45% 48%, transparent 49%) 78% 20px / 38px 30px no-repeat;
}

.submission-preview.page-two {
  background-color: #f4eee4;
}

.submission-preview.page-two::before {
  background:
    linear-gradient(#f4b3c2, #f4b3c2) 0 0 / 38% 6px no-repeat,
    linear-gradient(#d8ecd7, #d8ecd7) 0 15px / 88% 13px no-repeat,
    linear-gradient(#ead9bd, #ead9bd) 0 39px / 72% 8px no-repeat,
    linear-gradient(90deg, transparent 0 28%, #d9c5a6 28% 32%, transparent 32% 58%, #d9c5a6 58% 62%, transparent 62%);
}

.submission-preview.material-ready::after {
  background:
    linear-gradient(#d5ecf0, #d5ecf0) 0 0 / 100% 10px no-repeat,
    linear-gradient(#f2d6a8, #f2d6a8) 0 20px / 80% 8px no-repeat,
    linear-gradient(#dbc8a8, #dbc8a8) 0 36px / 58% 7px no-repeat,
    linear-gradient(135deg, transparent 42%, #8b8279 43% 47%, transparent 48%) 78% 19px / 40px 32px no-repeat,
    radial-gradient(circle, #f4c6d2 0 3px, transparent 4px) 85% 4px / 16px 16px no-repeat;
}

.submission-item a {
  color: #31485b;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submission-item a.downloaded {
  color: #07853b;
}

.feedback-input {
  width: 100%;
  border: 1px solid rgba(105, 148, 137, 0.22);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(31, 71, 61, 0.08);
}

.feedback-input.short {
  height: 34px;
  margin-top: 10px;
  margin-bottom: 0;
}

.feedback-input.large {
  min-height: 154px;
  border-radius: 22px;
}

.feedback-input.submission-box {
  display: flex;
  align-items: center;
  padding: 14px;
}

.cookie-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.cookie {
  min-height: 74px;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #2f332f;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
}

.cookie.selected {
  border-color: rgba(27, 105, 83, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.candy-stack {
  position: relative;
  width: 78px;
  min-height: 40px;
  display: block;
}

.candy-stack img {
  position: absolute;
  top: 2px;
  width: 43px;
  height: auto;
  filter: drop-shadow(0 5px 5px rgba(98, 75, 35, 0.18));
}

.candy-stack.one img {
  left: 18px;
}

.candy-stack.two img:first-child,
.candy-stack.three img:first-child {
  left: 8px;
}

.candy-stack.two img:last-child {
  left: 28px;
}

.candy-stack.three img:nth-child(2) {
  left: 22px;
  top: -2px;
}

.candy-stack.three img:nth-child(3) {
  left: 36px;
}

.cookie strong {
  font-size: 14px;
}

.feedback-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.feedback-actions button {
  min-width: 74px;
  min-height: 36px;
  border: 1px solid rgba(83, 94, 82, 0.18);
  border-radius: 999px;
  color: #27382f;
  background: #ded8c9;
  font-weight: 800;
  cursor: pointer;
}

.feedback-actions button:first-child {
  background: #eee5cf;
}

@media (max-width: 1100px) {
  .coupon-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .coupon-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-manage-layout {
    grid-template-columns: 1fr;
  }

  .student-candy-grid {
    grid-template-columns: repeat(3, minmax(142px, 1fr));
  }

  .candy-grant-popup {
    position: static;
    max-width: 420px;
  }

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

  .student-grid {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }

  .feedback-card {
    max-width: 460px;
  }
}

@media (max-width: 760px) {
  body {
    display: block;
  }

  body.menu-open {
    overflow: hidden;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .assignment-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  time {
    font-size: 20px;
  }

  .student-management-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-candy-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }

  .coupon-grid {
    grid-template-columns: repeat(2, minmax(138px, 1fr));
  }

  .coupon-rule {
    min-width: 0;
    width: 100%;
  }

  .student-grid {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }

  .cookie-options {
    grid-template-columns: 1fr;
  }
}

/* Kid-friendly visual refresh */
:root {
  --sidebar: #0f6a40;
  --sidebar-deep: #064c30;
  --mint: #d8fbef;
  --mint-strong: #9fe7cd;
  --mint-dark: #17765f;
  --paper: rgba(255, 255, 255, 0.88);
  --ink: #16342f;
  --muted: #638179;
  --line: rgba(69, 145, 126, 0.16);
}

body {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 234, 161, 0.55), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(255, 197, 226, 0.5), transparent 26%),
    radial-gradient(circle at 66% 76%, rgba(147, 222, 255, 0.42), transparent 28%),
    linear-gradient(135deg, #f2fff9 0%, #ddfbef 46%, #fff9e9 100%);
}

.sidebar {
  width: 250px;
  padding: 22px 16px;
  background:
    radial-gradient(circle at 28% 8%, rgba(255, 255, 255, 0.16), transparent 18%),
    radial-gradient(circle at 75% 72%, rgba(255, 215, 117, 0.18), transparent 24%),
    linear-gradient(180deg, #117342, #064729);
  border-right: 4px solid rgba(255, 255, 255, 0.18);
}

.brand {
  min-height: 54px;
  border-radius: 18px;
  color: #fff;
  font-size: 31px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
}

.brand:hover {
  background: rgba(255, 255, 255, 0.1);
}

.create-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  font-size: 17px;
}

.create-btn.active,
.create-btn.active-create {
  background: linear-gradient(135deg, #ff9d61, #ff6f59);
  box-shadow: 0 14px 28px rgba(255, 111, 89, 0.24);
}

.nav {
  gap: 14px;
}

.nav a,
.settings-link {
  min-height: 58px;
  border-radius: 16px;
  font-size: 18px;
}

.nav span,
.settings-link span {
  width: 28px;
  font-size: 20px;
}

.nav a.active,
.settings-link.active {
  color: #0b4d36;
  background: linear-gradient(135deg, #caffdf, #9debcf);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.topbar {
  height: 54px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.assignment-create,
.dashboard,
.student-management,
.assignment,
.coupon-builder,
.settings-page {
  padding: 34px 36px 48px;
}

.assignment-create h1,
.student-management-head h1,
.coupon-hero h1,
.settings-page h1,
.dashboard h2,
.class-praise h2,
.student-section h2 {
  color: #163b34;
  letter-spacing: 0;
}

.assignment-create h1,
.student-management-head h1,
.coupon-hero h1,
.settings-page h1 {
  font-size: 34px;
}

.create-panel,
.dashboard-stat,
.dashboard-table,
.settings-card,
.coupon-hero,
.candy-card,
.feedback-card,
.class-praise,
.student-card,
.coupon-card {
  border-color: rgba(66, 147, 126, 0.14);
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 215, 238, 0.26), transparent 22%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px rgba(34, 103, 88, 0.11);
}

.create-panel,
.settings-card,
.dashboard-table,
.coupon-hero,
.feedback-card {
  border-radius: 24px;
}

.field input,
.field textarea,
.class-form input,
.roster-row input {
  border-radius: 14px;
  border-color: rgba(65, 135, 121, 0.16);
  background: #ffffff;
}

.field input,
.class-form input {
  min-height: 50px;
}

.editor-toolbar {
  min-height: 44px;
  border-radius: 14px 14px 0 0;
  background: #f6fffb;
}

.create-actions .save,
.settings-actions .save,
.class-form button,
.primary-check {
  background: linear-gradient(135deg, #ffc43b, #ff9800);
  color: #17352f;
  box-shadow: 0 12px 22px rgba(255, 152, 0, 0.22);
}

.create-actions .ghost,
.settings-actions .ghost {
  background: #e4eff4;
}

.assignment-tabs button,
.progress-milestones span,
.coupon-step,
.submit-badge,
.candy-total,
.praise-summary,
.pick-student {
  border-radius: 999px;
}

.assignment-tabs button {
  min-height: 40px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.8);
}

.assignment-tabs button.active {
  background: linear-gradient(135deg, #bdfbe6, #8fe6d0);
}

.student-card {
  border-radius: 18px;
  background:
    radial-gradient(120px 90px at 96% 92%, rgba(77, 190, 171, 0.42), transparent 58%),
    linear-gradient(135deg, #a7efd7, #7edac5);
}

.student-card span.submitted {
  color: #087b3c;
  background: #ddffe9;
}

.candy-card {
  min-height: 198px;
  border-radius: 24px;
}

.student-face {
  width: 64px;
  height: 64px;
  font-size: 34px;
  box-shadow: inset 0 -8px 18px rgba(255, 255, 255, 0.34);
}

.candy-total {
  color: #e2328d;
  background: #fff0f8;
}

.candy-grant-popup {
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 205, 232, 0.68), transparent 30%),
    rgba(255, 255, 255, 0.9);
}

.grant-options button,
.cookie {
  border-radius: 20px;
}

.coupon-card {
  border-radius: 24px;
}

.coupon-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #fff2a8, #ffd2ec);
}

.coupon-name-input {
  background: rgba(255, 255, 255, 0.86);
}

.progress-track {
  height: 20px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(16.666% - 1px), rgba(62, 93, 103, 0.14) calc(16.666% - 1px) 16.666%),
    #dcedf1;
}

.progress-fill {
  background: linear-gradient(90deg, #ff9d00, #ffd166, #ff7abf);
}

.submission-thumb {
  width: 54px;
  height: 40px;
  border-radius: 10px;
}

.roster-head {
  background: linear-gradient(180deg, #fff5cf, #ffe3a3);
}

/* Strong kid theme override */
body {
  color: #183a48 !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 221, 92, 0.72), transparent 16%),
    radial-gradient(circle at 80% 18%, rgba(255, 142, 202, 0.45), transparent 18%),
    radial-gradient(circle at 76% 78%, rgba(108, 213, 255, 0.44), transparent 22%),
    linear-gradient(135deg, #e9fff8 0%, #cffff0 44%, #fff7df 100%) !important;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #0a8a58 0%, #077247 56%, #045432 100%) !important;
  border-right: 6px solid #bff7df !important;
  box-shadow: 8px 0 28px rgba(3, 82, 50, 0.18) !important;
}

.brand {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 2px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 22px !important;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.14) !important;
}

.create-btn {
  color: #fff !important;
  background: linear-gradient(135deg, #ffb04f, #ff6f59) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 0 rgba(158, 70, 38, 0.2), 0 20px 30px rgba(255, 111, 89, 0.2) !important;
}

.nav a,
.settings-link {
  border-radius: 18px !important;
  color: #f5fff9 !important;
}

.nav a:hover,
.settings-link:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

.nav a.active,
.settings-link.active {
  color: #075137 !important;
  background: linear-gradient(135deg, #fff59c, #9dffd6) !important;
  box-shadow: 0 10px 0 rgba(7, 81, 55, 0.14), 0 18px 30px rgba(0, 0, 0, 0.18) !important;
}

.topbar {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 2px solid rgba(9, 138, 88, 0.12) !important;
}

.assignment-create h1,
.student-management-head h1,
.coupon-hero h1,
.settings-page h1 {
  color: #113f47 !important;
  font-size: 36px !important;
}

.create-panel,
.dashboard-stat,
.dashboard-table,
.settings-card,
.coupon-hero,
.candy-card,
.feedback-card,
.class-praise,
.student-card,
.coupon-card {
  border: 2px solid rgba(255, 171, 217, 0.34) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 227, 116, 0.32), transparent 22%),
    radial-gradient(circle at 16% 80%, rgba(137, 228, 255, 0.24), transparent 20%),
    rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 18px 0 rgba(255, 255, 255, 0.32), 0 22px 42px rgba(35, 110, 93, 0.15) !important;
}

.field input,
.field textarea,
.class-form input,
.roster-row input {
  min-height: 52px !important;
  border: 2px solid #d8eee9 !important;
  border-radius: 18px !important;
  background: #fff !important;
}

.assignment-tabs button,
.submit-badge,
.progress-milestones span,
.coupon-step,
.candy-total,
.praise-summary,
.pick-student {
  border-radius: 999px !important;
}

.assignment-tabs button {
  color: #12634f !important;
  background: #ffffff !important;
  border: 2px solid #bcefe0 !important;
  box-shadow: 0 6px 0 rgba(18, 99, 79, 0.09) !important;
}

.assignment-tabs button.active {
  background: linear-gradient(135deg, #fff59c, #8ff5d2) !important;
}

.student-card {
  background:
    radial-gradient(120px 92px at 96% 92%, rgba(255, 255, 255, 0.26), transparent 58%),
    linear-gradient(135deg, #a3f2da, #72dbc8) !important;
}

.candy-card {
  border-color: rgba(255, 142, 202, 0.4) !important;
}

.student-face,
.coupon-icon {
  background: linear-gradient(135deg, #fff18a, #ffc8ec) !important;
  box-shadow: inset 0 -10px 18px rgba(255, 255, 255, 0.36), 0 10px 18px rgba(255, 142, 202, 0.16) !important;
}

.candy-total,
.praise-summary {
  color: #e2328d !important;
  background: #fff0f8 !important;
}

.primary-check,
.create-actions .save,
.settings-actions .save,
.class-form button {
  color: #153b36 !important;
  background: linear-gradient(135deg, #ffe66d, #ff9f1c) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 0 rgba(190, 116, 0, 0.18), 0 18px 28px rgba(255, 159, 28, 0.2) !important;
}

.progress-fill {
  background: linear-gradient(90deg, #ff9f1c, #ffe66d, #ff70b8) !important;
}

/* Final responsive layout pass */
.dashboard-table,
.student-roster {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-table table {
  min-width: 620px;
}

.page,
.app-screen {
  min-width: 0;
}

.mobile-header,
.menu-overlay {
  display: none;
}

@media (max-width: 1180px) {
  .assignment-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .primary-check {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .student-candy-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .coupon-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

@media (max-width: 980px) {
  body {
    display: block;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 26%),
      linear-gradient(180deg, #0a8a58 0%, #077247 56%, #045432 100%);
    border-bottom: 5px solid #bff7df;
    box-shadow: 0 8px 24px rgba(3, 82, 50, 0.18);
  }

  .hamburger-btn {
    width: 46px;
    height: 46px;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
  }

  .hamburger-btn span {
    width: 22px;
    height: 3px;
    display: block;
    border-radius: 999px;
    background: #fff;
    transition: transform 220ms ease, opacity 180ms ease;
  }

  .menu-open .hamburger-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .mobile-brand {
    min-height: 46px;
    padding: 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
    cursor: pointer;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(6, 38, 26, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  .menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: min(78vw, 292px) !important;
    max-width: none;
    height: 100dvh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    padding: 22px 16px !important;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-104%);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    border-right: 6px solid #bff7df !important;
    border-bottom: 0 !important;
    box-shadow: 18px 0 38px rgba(3, 82, 50, 0.28) !important;
    will-change: transform;
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar > * {
    min-width: auto;
  }

  .brand {
    min-height: 54px;
    padding: 0 14px;
    font-size: 28px !important;
    white-space: nowrap;
  }

  .create-btn {
    min-height: 54px;
    font-size: 17px;
    white-space: nowrap;
  }

  .nav {
    width: 100%;
    display: grid;
    gap: 14px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav a,
  .settings-link {
    flex: none;
    min-height: 58px;
    padding: 0 18px;
    font-size: 18px;
  }

  .settings-link {
    justify-self: stretch;
    min-width: auto;
    margin-top: auto;
  }

  .topbar {
    height: auto;
    min-height: 48px;
    padding: 10px 18px;
  }

  .assignment-create,
  .dashboard,
  .student-management,
  .assignment,
  .coupon-builder,
  .settings-page {
    padding: 24px 18px 36px;
  }

  .assignment-create h1,
  .student-management-head h1,
  .coupon-hero h1,
  .settings-page h1 {
    font-size: 30px !important;
  }

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

  .student-manage-layout,
  .workspace {
    grid-template-columns: 1fr;
  }

  .candy-grant-popup,
  .feedback-card {
    position: static;
    width: 100%;
    max-width: none;
  }

  .student-grid {
    grid-template-columns: repeat(3, minmax(118px, 1fr));
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .praise-head,
  .coupon-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .coupon-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .roster-row {
    min-width: 640px;
  }
}

@media (max-width: 640px) {
  .sidebar {
    width: min(82vw, 280px) !important;
  }

  .page-owner {
    width: auto;
    max-width: 100%;
    text-align: right;
    font-size: 14px;
  }

  .topbar {
    display: block;
    justify-content: flex-end;
    overflow: hidden;
    white-space: nowrap;
  }

  .topbar > div {
    display: none;
  }

  .assignment-create,
  .dashboard,
  .student-management,
  .assignment,
  .coupon-builder,
  .settings-page {
    padding: 20px 12px 30px;
  }

  .assignment-create h1,
  .student-management-head h1,
  .coupon-hero h1,
  .settings-page h1 {
    font-size: 26px !important;
  }

  .create-panel,
  .dashboard-table,
  .settings-card,
  .coupon-hero,
  .feedback-card,
  .candy-grant-popup {
    padding: 18px 14px;
    border-radius: 20px !important;
  }

  .roster-card {
    padding: 0 0 16px;
  }

  .roster-title {
    padding: 18px 14px 12px;
  }

  .student-roster {
    margin: 0 14px;
  }

  .date-grid,
  .class-form,
  .dashboard-stats,
  .student-candy-grid,
  .student-grid,
  .coupon-grid,
  .submission-downloads {
    grid-template-columns: 1fr;
  }

  .student-candy-grid {
    gap: 14px;
  }

  .candy-card {
    min-height: 170px;
  }

  .student-card {
    min-height: 104px;
  }

  .assignment-head {
    grid-template-columns: 1fr;
  }

  .primary-check {
    width: 100%;
  }

  .assignment-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .assignment-tabs button {
    flex: 0 0 auto;
  }

  time {
    font-size: 18px;
  }

  .student-management-head,
  .create-actions,
  .settings-actions,
  .feedback-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .student-management-head button,
  .create-actions button,
  .settings-actions button,
  .feedback-actions button {
    width: 100%;
  }

  .praise-summary {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 48px;
  }

  .progress-milestones {
    grid-template-columns: 1fr;
  }

  .coupon-rule {
    width: 100%;
    min-width: 0;
  }

  .cookie-options {
    grid-template-columns: 1fr;
  }
}
