/* Shalvit Online School — app pages (sign-in, register, dashboard and
   the signed-in sections). Companion to style.css: the same approved
   app design (cream ground, Baloo 2 + Nunito, amber-ringed surfaces,
   glossy dashboard tiles). No build step. */

.auth-wrap { max-width: 560px; margin: 0 auto; padding: 28px 20px 64px; }
.dash-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; padding: 26px;
  box-shadow: 0 12px 28px -16px rgba(180, 110, 10, .35);
}
.panel h1 { font-size: 1.8rem; margin: 0 0 6px; font-weight: 800; }
.panel .sub { color: var(--dim); line-height: 1.6; margin: 0 0 18px; }

.field { margin: 0 0 16px; }
.field label { display: block; font-size: .92rem; font-weight: 700; font-family: var(--font-display); color: var(--text); margin: 0 0 6px; }
.field .hint { font-weight: 600; color: var(--dim); font-size: .85rem; font-family: var(--font-body); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 16px; font-size: 1rem;
  border: 1px solid var(--border); background: var(--surface-warm); color: var(--text);
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; background: #fff; }

.btn.block { display: block; width: 100%; text-align: center; border: 1px solid #fcd34d; cursor: pointer; }
.btn.small { padding: 9px 16px; font-size: .92rem; cursor: pointer; }
button.btn { font-family: var(--font-display); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 22px; border-radius: 999px; cursor: pointer;
  background: #ffffff; color: var(--text); font-weight: 700; font-size: 1rem; font-family: var(--font-display);
  border: 1px solid var(--border); box-shadow: 0 4px 12px -6px rgba(120, 70, 5, .35);
}
.btn-google:hover { background: var(--surface-warm); }
.btn-google .g { font-family: var(--font-display); font-weight: 800; color: #d97706; font-size: 1.15rem; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--dim); font-size: .88rem; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.mode-row { display: flex; gap: 8px; margin: 0 0 16px; }
.mode-row button {
  flex: 1; padding: 10px; border-radius: 999px; cursor: pointer; font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  background: var(--surface-warm); color: var(--dim); border: 2px solid var(--border);
}
.mode-row button.on { background: var(--teal); color: #fff; font-weight: 800; border-color: var(--teal); }

.msg { border-radius: 16px; padding: 13px 16px; line-height: 1.55; font-size: .96rem; margin: 0 0 16px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.msg.notice { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; }
.msg.good { background: #f0fdf9; border: 1px solid #99f6e4; color: #134e4a; }
.msg a { color: #115e59; font-weight: 800; }

/* Registration doors */
.door-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 18px; }
.door-card {
  position: relative; display: block; cursor: pointer; border-radius: 24px; padding: 18px;
  background: var(--surface); border: 2px solid var(--border);
  transition: transform .3s cubic-bezier(.22, .9, .3, 1), box-shadow .3s ease;
}
.door-card input { position: absolute; opacity: 0; pointer-events: none; }
.door-card h3 { color: var(--text); margin: 0 0 6px; font-size: 1.08rem; font-weight: 800; }
.door-card p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--dim); }
.door-card p strong { color: var(--text); }
.door-card:hover { border-color: #fbbf24; transform: translateY(-2px); }
.door-card.selected, .door-card:has(input:checked) {
  border-color: var(--teal); background: #f0fdf9;
  box-shadow: 0 0 0 1px var(--teal) inset, 0 10px 20px -12px rgba(15, 118, 110, .4);
}

.child-block { border: 1px dashed #f59e0b; background: var(--surface-warm); border-radius: 16px; padding: 14px; margin: 0 0 12px; }
.child-block .row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.child-block .field { margin: 0; }
.link-btn { background: none; border: none; color: var(--teal); cursor: pointer; font-size: .92rem; font-weight: 700; font-family: var(--font-display); padding: 6px 0; }
.link-btn.danger { color: #dc2626; }

/* Dashboard */
.dash-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: 28px; padding: 22px 24px; margin: 0 0 10px;
  background: linear-gradient(120deg, #042f2e, #115e59 55%, #0f766e);
  color: #fff; box-shadow: 0 16px 30px -16px rgba(4, 47, 46, .55);
  position: relative; overflow: hidden;
}
.dash-head::after {
  content: ""; position: absolute; inset: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  animation: dashSheen 7s ease-in-out infinite; pointer-events: none;
}
.dash-head h1 { font-size: 1.9rem; margin: 0; margin-right: auto; color: #fff; font-weight: 800; }
.dash-head .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }
.dash-head .btn.ghost:hover { background: rgba(255,255,255,.2); }
.pill {
  display: inline-block; background: #f59e0b; color: #1c1917; font-weight: 800;
  border-radius: 999px; padding: 4px 12px; font-size: .85rem; text-transform: capitalize;
  font-family: var(--font-display);
}
section.dash-block { margin: 30px 0; }
section.dash-block > h2 { font-size: 1.4rem; margin: 0 0 12px; font-weight: 800; }
section.dash-block > h3 { font-weight: 800; }
.item-list { display: grid; gap: 10px; }
.item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 15px 18px; line-height: 1.6;
  box-shadow: 0 1px 3px rgba(120, 70, 5, .05);
}
.item .t { font-weight: 700; color: var(--text); font-family: var(--font-display); font-size: 1.02rem; }
.item .t a { color: var(--teal); text-decoration: none; }
.item .t a:hover { text-decoration: underline; }
.item .d { color: var(--dim); font-size: .93rem; }
#hub-block .item {
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 10px 22px -14px rgba(120, 70, 5, .35);
  transition: transform .3s cubic-bezier(.22, .9, .3, 1);
}
@media (hover: hover) { #hub-block .item:hover { transform: translateY(-3px); } }
.empty-note {
  background: #fffbeb; border: 1px dashed #f59e0b;
  border-radius: 16px; padding: 14px 16px; color: #57534e; line-height: 1.6;
}
.refcode { font-family: var(--font-display); letter-spacing: 1px; color: #115e59; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .dash-head::after { animation: none; }
  #hub-block .item { transition: none; }
  #hub-block .item:hover { transform: none; }
}

@media (max-width: 560px) {
  .child-block .row { grid-template-columns: 1fr; }
  .dash-head { padding: 18px; }
  .dash-head h1 { font-size: 1.5rem; }
}
