/* ===== PodsCool - auth pages (login / signup / dashboard) ===== */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -10%, #eef5ea 0%, rgba(238,245,234,0) 60%),
    var(--bg);
}

.auth-topbar {
  padding: 20px 0;
}
.auth-topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 56px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 30px;
}

.auth-card__head {
  text-align: center;
  margin-bottom: 22px;
}
.auth-card__head h1 {
  font-family: var(--head);
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 6px;
}
.auth-card__head p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Role picker (signup) */
.role-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.role-option {
  position: relative;
}
.role-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.role-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.role-option label .role-ico { font-size: 1.4rem; line-height: 1; }
.role-option label .role-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.role-option input:hover + label { border-color: var(--green); }
.role-option input:checked + label {
  border-color: var(--green);
  background: #f2f8ef;
  box-shadow: 0 0 0 3px rgba(163,200,147,.25);
}
.role-option input:focus-visible + label {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-google:hover { background: var(--bg-soft); border-color: var(--muted-2); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 0.82rem;
  margin: 18px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Fields */
.auth-form .field { margin-bottom: 14px; }
.auth-form label.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-form input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-btn);
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(163,200,147,.22);
}
.auth-form input.invalid { border-color: #dc2626; }

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.link-muted {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
}
.link-muted:hover { text-decoration: underline; }

.auth-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  margin: 4px 0 12px;
  text-align: center;
}
.auth-status.err { color: #dc2626; }
.auth-status.ok  { color: var(--emerald); }

.auth-foot {
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 18px;
}
.auth-foot a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.btn[disabled], .btn-google[disabled] { opacity: .6; cursor: not-allowed; }

/* ===== Dashboard ===== */
.dash-main { flex: 1; padding: 40px 20px 64px; }
.dash-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
}
.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f2f8ef;
  color: var(--emerald);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: capitalize;
  margin-bottom: 14px;
}
.dash-card h1 {
  font-family: var(--head);
  color: var(--ink);
  margin: 0 0 8px;
}
.dash-card p.dash-sub { color: var(--muted); margin: 0 0 22px; }
.dash-next {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-user img, .dash-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover;
  background: var(--green);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

/* ===== Google Classroom panel ===== */
.dash-card--classroom { margin-top: 18px; }

.cr-banner {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.cr-banner--ok, .cr-flash.cr-banner--ok {
  background: #f2f8ef; color: var(--emerald); border: 1px solid #cfe6c2;
}
.cr-banner--err, .cr-flash.cr-banner--err {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
}
.cr-banner--warn {
  background: #fffbeb; color: #92400e; border: 1px solid #fde68a;
}
.cr-banner--warn a { color: #92400e; font-weight: 700; }
.cr-flash { border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; margin-bottom: 14px; }

.cr-connect {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: center;
}
.cr-connect__ico {
  grid-row: span 2;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: var(--bg-soft);
  border-radius: 12px;
}
.cr-connect h3 { font-family: var(--head); color: var(--ink); margin: 0 0 4px; font-size: 1.15rem; }
.cr-connect p { color: var(--muted); margin: 0; font-size: 0.93rem; }
.cr-connect .btn { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }

.cr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.cr-meta { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; }
.cr-actions { display: flex; align-items: center; gap: 14px; flex: none; }

.cr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.cr-pod {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg);
}
.cr-pod__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cr-pod__top h4 { font-family: var(--head); color: var(--ink); margin: 0; font-size: 1rem; }
.cr-pod__sec { color: var(--muted-2); font-size: 0.8rem; flex: none; }
.cr-pod__stat { color: var(--muted); font-size: 0.86rem; margin: 6px 0 10px; }
.cr-pod__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.cr-roster { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.cr-roster__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.cr-roster__list li { display: flex; flex-direction: column; }
.cr-roster__name { color: var(--ink); font-size: 0.88rem; font-weight: 600; }
.cr-roster__email { color: var(--muted-2); font-size: 0.8rem; }

.cr-empty { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }

/* ---- Pod cards: offering / status ---- */
.cr-pod__foot { flex-wrap: wrap; margin-top: 12px; }
.btn--sm { padding: 7px 14px; font-size: 0.85rem; }

.cr-pill {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.cr-pill--none { background: var(--bg-soft); color: var(--muted); }
.cr-pill--draft { background: #fef3c7; color: #b45309; }
.cr-pill--live { background: #dcfce7; color: #047857; }
.cr-pill--session { background: #fde68a; color: #92400e; animation: cr-pulse 1.6s ease-in-out infinite; }
@keyframes cr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .cr-pill--session { animation: none; } }

/* ---- Wide 3-up pod cards (bigger, richer, whole-card clickable) ---- */
.cr-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1040px) { .cr-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 660px)  { .cr-grid--wide { grid-template-columns: 1fr; } }

.cr-pod--clickable { padding: 20px; cursor: pointer; transition: border-color .12s, box-shadow .14s, transform .12s; }
a.cr-pod { display: block; text-decoration: none; color: inherit; }
.cr-pod--clickable:hover { border-color: var(--green); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cr-pod--clickable:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cr-pod--clickable .cr-pod__top h4 { font-size: 1.12rem; }

.cr-pod__course { color: var(--muted); font-size: 0.82rem; margin: 5px 0 12px; }
.cr-pod__price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.cr-pod__stats { display: flex; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.cr-stat { display: flex; flex-direction: column; gap: 2px; }
.cr-stat b { font-family: var(--head); font-size: 1.2rem; color: var(--ink); line-height: 1; }
.cr-stat span { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.cr-pod__grades { color: var(--muted); font-size: 0.82rem; margin: 0 0 4px; }
.cr-pod__open { margin-left: auto; color: var(--emerald); font-weight: 700; font-size: 0.86rem; cursor: pointer; align-self: center; }

.cr-pod__offer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cr-pod__price { font-family: var(--head); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.cr-pod__price small { font-weight: 600; color: var(--muted); font-size: 0.72rem; }
.cr-tag {
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
  background: var(--tag-bg); border-radius: 6px; padding: 3px 8px;
}
.cr-pod__sched { color: var(--muted); font-size: 0.82rem; margin: 2px 0 0; }
.cr-pod__hint { color: var(--muted-2); font-size: 0.82rem; margin: 8px 0 0; font-style: italic; }

/* ===== Pod editor modal ===== */
.pe-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pe-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.pe-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
  overflow: hidden;
}
.pe-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.pe-head h2 { font-family: var(--head); color: var(--ink); margin: 0; font-size: 1.25rem; }
.pe-sub { color: var(--muted); font-size: 0.88rem; margin: 3px 0 0; }
.pe-x { border: none; background: none; font-size: 1.1rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px; }
.pe-x:hover { color: var(--ink); }

.pe-body { padding: 18px 22px; overflow-y: auto; }
.pe-section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--emerald); margin: 0 0 10px;
}
.pe-field { display: block; margin-bottom: 15px; }
.pe-field[hidden] { display: none; }
.pe-label { display: block; font-weight: 600; font-size: 0.82rem; color: var(--ink); margin-bottom: 6px; }
.pe-body input[type="text"],
.pe-body input[type="number"],
.pe-body input[type="time"],
.pe-body select,
.pe-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
}
.pe-body input:focus, .pe-body select:focus, .pe-body textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(163, 200, 147, .22);
}
.pe-body textarea { resize: vertical; }
.pe-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.pe-row .pe-field { margin-bottom: 15px; }

.pe-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pe-chip { position: relative; }
.pe-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pe-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 6px 10px;
  border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.pe-chip input:hover + span { border-color: var(--green); }
.pe-chip input:checked + span { border-color: var(--green); background: #f2f8ef; color: var(--emerald); }

.pe-err { color: #b91c1c; font-size: 0.88rem; margin: 4px 0 0; min-height: 1em; }
.pe-err .pe-hint { color: var(--muted); display: block; margin-top: 2px; font-size: 0.8rem; }
.pe-err #pe-reconnect { color: #b91c1c; font-weight: 700; }

.pe-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg-soft);
}
.pe-foot__right { display: flex; gap: 10px; }
@media (max-width: 520px) {
  .pe-foot { flex-direction: column; align-items: stretch; }
  .pe-foot__right { flex-direction: column; }
}

/* ===== Pod creator (course picker) ===== */
.pc-box { max-width: 560px; }
.pc-searchbar { padding: 14px 22px 6px; }
.pc-searchbar input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
}
.pc-searchbar input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(163, 200, 147, .2); }
.pc-body { padding-top: 8px; display: grid; gap: 8px; }

.pc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  font-family: var(--sans);
}
.pc-item:hover { border-color: var(--green); background: #f7faf5; }
.pc-item__ico {
  flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: var(--bg-soft); border-radius: 10px;
}
.pc-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-item__name { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.pc-item__meta { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-item__right { flex: none; }
.pc-item__go { color: var(--emerald); font-weight: 700; font-size: 0.85rem; }

.pc-connect { text-align: center; padding: 20px 8px; display: grid; gap: 12px; justify-items: center; }
.pc-connect p { color: var(--muted); margin: 0; font-size: 0.92rem; max-width: 380px; }

.pc-item--new { border-style: dashed; border-color: var(--green); background: #f7faf5; }
.pc-item--new .pc-item__ico { background: #e6f2df; }
.pc-divider {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted-2); margin: 6px 2px 2px;
}

/* Pods section header inside the panel */
.cr-pods-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0 12px; gap: 12px;
}
.cr-pods-head h3 { font-family: var(--head); color: var(--ink); margin: 0; font-size: 1.05rem; }

/* Version/effective-date line inside the signup terms modal. */
.tmodal__ver { font-size: 12px; color: var(--muted, #6b7280); margin: -4px 0 10px; font-weight: 600; }

/* [work/admin-console-roundout] Dashboard pod card: delete/cancel control. */
.cr-del-btn { background: none; border: 0; color: #b23b3b; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.cr-del-btn:hover { color: #8f2d2d; text-decoration: underline; }
