:root {
  --purple: #7558d8;
  --purple-soft: #eee9ff;
  --sun: #ffb648;
  --pink: #f26f91;
  --sky: #46a9d4;
}

body {
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 182, 72, .11), transparent 22rem),
    radial-gradient(circle at 93% 45%, rgba(117, 88, 216, .09), transparent 25rem),
    #fbfcfa;
}

.brand-mark {
  background: linear-gradient(145deg, var(--purple), var(--green));
  box-shadow: 0 8px 18px rgba(72, 70, 160, .24);
}

.topbar {
  border-bottom-color: rgba(117, 88, 216, .12);
  box-shadow: 0 5px 20px rgba(50, 67, 91, .04);
}

.welcome-screen.active {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 7%, rgba(255, 184, 75, .25), transparent 25%),
    radial-gradient(circle at 72% 78%, rgba(77, 190, 166, .20), transparent 28%),
    linear-gradient(125deg, #fffaf1 0 48%, #f1edff 48% 100%);
}

.welcome-screen::before,
.welcome-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.welcome-screen::before {
  width: 150px;
  height: 150px;
  right: -55px;
  top: 80px;
  background: rgba(242, 111, 145, .16);
}

.welcome-screen::after {
  width: 75px;
  height: 75px;
  left: 46%;
  bottom: 8%;
  background: rgba(70, 169, 212, .18);
}

.hero-copy,
.role-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: #6b4fc7;
  background: var(--purple-soft);
}

.hero-copy h1 em {
  background: linear-gradient(100deg, var(--green), var(--purple), var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.role-panel {
  border: 1px solid rgba(117, 88, 216, .18);
  box-shadow: 0 25px 80px rgba(70, 57, 139, .17);
}

.student-card {
  background: linear-gradient(110deg, #f4fcf9, #fff);
}

.scribe-card {
  background: linear-gradient(110deg, #fff5f1, #fff9fd);
}

.student-card .role-icon {
  background: linear-gradient(145deg, #d7f6ed, #dcf1ff);
}

.scribe-card .role-icon {
  background: linear-gradient(145deg, #ffe0d7, #f8def4);
}

.role-card .arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(25, 47, 62, .1);
}

.primary-btn {
  background: linear-gradient(135deg, var(--green), #16a284);
}

.coral-btn {
  background: linear-gradient(135deg, var(--coral), var(--pink));
}

.form-screen {
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 182, 72, .2), transparent 18rem),
    radial-gradient(circle at 12% 18%, rgba(117, 88, 216, .13), transparent 20rem),
    linear-gradient(#e9f7f2 330px, #fbfcfa 330px);
}

.form-card {
  border-color: rgba(117, 88, 216, .16);
  box-shadow: 0 22px 70px rgba(54, 72, 88, .13);
}

.form-card::before {
  content: '';
  display: block;
  height: 5px;
  margin: calc(clamp(24px, 5vw, 48px) * -1) calc(clamp(24px, 5vw, 48px) * -1) 35px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--green), var(--sky), var(--purple), var(--pink), var(--sun));
}

/* The action and input share one border, keeping Send OTP perfectly aligned. */
.form-grid .input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 50px;
  margin-top: 7px;
  overflow: hidden;
  border: 1.5px solid #bfcfcb;
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.form-grid .input-action:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 103, 94, .18);
}

.form-grid .input-action input {
  min-width: 0;
  height: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  outline: 0;
}

.form-grid .input-action input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.form-grid .input-action .otp-btn {
  position: static;
  min-width: 104px;
  height: auto;
  margin: 5px;
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--purple-soft), #dff6f0);
  color: #513ca7;
  white-space: nowrap;
}

.upload-box {
  background: linear-gradient(135deg, #f0faf7, #f6f2ff);
  border-color: #a9cfc7;
}

.choice-pills input:checked + span {
  background: linear-gradient(135deg, var(--green-2), var(--purple-soft));
}

.feature-grid article:nth-child(1) > span { background: #e4f7f2; color: var(--green); }
.feature-grid article:nth-child(2) > span { background: #eee9ff; color: var(--purple); }
.feature-grid article:nth-child(3) > span { background: #fff0dd; color: #d4781b; }

.success-screen {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 182, 72, .16), transparent 18rem),
    radial-gradient(circle at 70% 10%, rgba(117, 88, 216, .14), transparent 20rem),
    radial-gradient(circle at 50% 10%, #e5f4ed, transparent 35%);
}

.request-list {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.request-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(124, 92, 255, .18);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 24px 70px rgba(72, 42, 132, .13);
  text-align: left;
}

.request-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(16, 24, 40, .09);
  padding-bottom: 18px;
}

.request-card h2 {
  font: 800 clamp(24px, 3vw, 34px)/1.1 Manrope, sans-serif;
  letter-spacing: -.03em;
  margin: 8px 0 5px;
}

.request-card p {
  margin: 0;
  color: var(--muted);
}

.request-status {
  display: inline-flex;
  color: #8a3f18;
  background: #fff0dd;
  border-radius: 999px;
  padding: 6px 11px;
  font: 800 12px Manrope, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.date-badge {
  min-width: 150px;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: center;
  background: linear-gradient(135deg, #fff0dd, #ffe1e8);
  color: #7a3412;
}

.date-badge strong,
.date-badge span {
  display: block;
}

.date-badge strong {
  font: 800 18px Manrope, sans-serif;
}

.request-card .button-row {
  margin-top: 22px;
}

.empty-card.compact {
  padding: 34px;
  margin-top: 24px;
}

@media (max-width: 850px) {
  .welcome-screen.active {
    background:
      radial-gradient(circle at 10% 7%, rgba(255, 184, 75, .24), transparent 30%),
      linear-gradient(150deg, #fffaf1, #f1edff 70%, #ebfaf5);
  }
}

@media (max-width: 520px) {
  .form-grid .input-action .otp-btn {
    min-width: 92px;
    padding-inline: 9px;
  }
}

@media(max-width:650px) {
  .request-card-head {
    flex-direction: column;
  }

  .date-badge {
    width: 100%;
  }
}
