/*
 * Boomerang Projects — Auth pages styles
 *
 * Used by:
 *   /teacher/login.html
 *   /teacher/dashboard.html
 *   /join.html
 *
 * Brand colors (Plum/Terracotta on warm cream — same as the gate):
 *   Plum         #3B1E5E
 *   Plum hover   #4A2873
 *   Terracotta   #B43A28
 *   Cream BG     #F5F1EC
 *   Card BG      #FFFFFF
 *   Border       #E6DFD6
 *   Text         #2A2230
 *   Muted        #5A5269
 *   Subtle       #7A6E85
 *   Soft cream   #FBF8F4
 *   Hairline     #D6CEC2
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #F5F1EC;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #2A2230;
  min-height: 100vh;
}

.bp-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bp-auth-card {
  max-width: 480px;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #E6DFD6;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(59, 30, 94, 0.08);
}

.bp-auth-mark {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 20px;
}

.bp-auth-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7A6E85;
  margin-bottom: 8px;
}

.bp-auth-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: #3B1E5E;
  font-weight: 600;
}

.bp-auth-subtitle {
  margin: 0 0 24px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #5A5269;
}

.bp-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bp-auth-row {
  display: flex;
  gap: 10px;
}

.bp-auth-row > .bp-auth-field { flex: 1; }
.bp-auth-row > .bp-auth-field.is-narrow { flex: 0 0 80px; }

.bp-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #2A2230;
}

.bp-auth-input {
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #D6CEC2;
  border-radius: 10px;
  background: #FBF8F4;
  color: #2A2230;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  width: 100%;
}
.bp-auth-input::placeholder {
  color: #B5B0BC;
  font-style: italic;
  opacity: 1;
}
.bp-auth-input:focus {
  border-color: #3B1E5E;
  box-shadow: 0 0 0 3px rgba(59, 30, 94, 0.12);
}
.bp-auth-input.is-error {
  border-color: #B43A28;
}

.bp-auth-error {
  font-size: 13px;
  color: #B43A28;
  min-height: 18px;
}

.bp-auth-success {
  font-size: 13px;
  color: #2F6B3E;
  background: #EAF4EC;
  border: 1px solid #C7E0CC;
  border-radius: 8px;
  padding: 10px 12px;
}

.bp-auth-btn {
  margin-top: 4px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: #3B1E5E;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms ease;
}
.bp-auth-btn:hover { background: #4A2873; }
.bp-auth-btn:disabled { opacity: 0.6; cursor: progress; }

.bp-auth-btn.is-secondary {
  background: transparent;
  color: #3B1E5E;
  border: 1px solid #D6CEC2;
}
.bp-auth-btn.is-secondary:hover { background: #FBF8F4; }

.bp-auth-foot {
  margin: 20px 0 0 0;
  font-size: 12px;
  color: #7A6E85;
  line-height: 1.5;
}
.bp-auth-foot a { color: #3B1E5E; text-decoration: none; border-bottom: 1px dotted #3B1E5E; }


/* ============ Dashboard-specific ============ */

.bp-dash-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.bp-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.bp-dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bp-dash-brand img { width: 36px; height: 36px; }
.bp-dash-brand-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #3B1E5E;
  line-height: 1.1;
}
.bp-dash-brand-sub {
  font-size: 11px;
  color: #7A6E85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bp-dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #5A5269;
}

.bp-dash-h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  line-height: 1.15;
  color: #2A2230;
  margin: 0 0 8px 0;
  font-weight: 600;
}
.bp-dash-h1-sub {
  font-size: 15px;
  color: #5A5269;
  margin: 0 0 24px 0;
}

.bp-dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px;
}
.bp-dash-section-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  margin: 0;
  color: #3B1E5E;
  font-weight: 600;
}

.bp-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.bp-class-card {
  background: #FFFFFF;
  border: 1px solid #E6DFD6;
  border-radius: 14px;
  padding: 20px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.bp-class-card:hover {
  border-color: #C8BBAD;
  box-shadow: 0 6px 20px rgba(59, 30, 94, 0.06);
}

.bp-class-card-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #2A2230;
  margin: 0 0 4px 0;
}
.bp-class-card-meta {
  font-size: 12px;
  color: #7A6E85;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.bp-class-card-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F5F1EC;
  border: 1px dashed #C8BBAD;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: 'Geist Mono', 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: #3B1E5E;
  font-weight: 500;
}
.bp-class-card-stats {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: #5A5269;
}
.bp-class-card-stats strong { color: #2A2230; font-weight: 600; }

.bp-empty {
  background: #FBF8F4;
  border: 1px dashed #C8BBAD;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  color: #5A5269;
}
.bp-empty h3 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0 0 6px 0;
  color: #3B1E5E;
  font-size: 18px;
}
.bp-empty p { margin: 0 0 16px 0; font-size: 14px; }

/* Modal for new class */
.bp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 34, 48, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.bp-modal {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.bp-modal h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  margin: 0 0 16px 0;
  color: #3B1E5E;
  font-weight: 600;
}

/* The just-created code preview after class creation */
.bp-code-display {
  background: linear-gradient(135deg, #F5F1EC 0%, #FBF8F4 100%);
  border: 1px solid #E6DFD6;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}
.bp-code-display-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7A6E85;
  margin-bottom: 8px;
}
.bp-code-display-value {
  font-family: 'Geist Mono', 'IBM Plex Mono', monospace;
  font-size: 28px;
  color: #3B1E5E;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.bp-code-display-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #5A5269;
}
