@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  background-color: #060913;
  color: #f8fafc;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.background-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
  animation: floatBlobs 14s ease-in-out infinite alternate;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0) 70%);
  top: -120px;
  left: -120px;
}

.blob-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #a855f7 0%, rgba(168, 85, 247, 0) 70%);
  bottom: -120px;
  right: -120px;
  animation-duration: 12s;
  animation-delay: -4s;
}

@keyframes floatBlobs {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  50% { transform: translateY(40px) scale(1.08) rotate(15deg); }
  100% { transform: translateY(-25px) scale(0.95) rotate(-10deg); }
}

.main-auth-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 40px 20px;
}

.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.15);
  border-radius: 26px;
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-icon {
  font-size: 44px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.brand h2 {
  font-size: 26px;
  font-weight: 800;
}

.brand h2 span {
  color: #38bdf8;
}

.brand p {
  font-size: 12.5px;
  color: #94a3b8;
}

.tab-box {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 4px;
  width: 100%;
  margin-bottom: 22px;
}

.tab-btn {
  flex: 1;
  padding: 11px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background: #38bdf8;
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.form-section {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 16px;
}

.form-section.active {
  display: flex;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-group i {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
}

.input-group input, .input-group select {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: rgba(6, 11, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.input-group input:focus, .input-group select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}

.sub-link {
  color: #94a3b8;
  font-size: 12.5px;
  text-decoration: none;
  text-align: center;
  margin-top: 6px;
}

.teacher-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  background: rgba(13, 20, 36, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-nav {
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-nav i { color: #38bdf8; }
.brand-nav b { color: #a855f7; }

.user-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 7px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
}

.dashboard-body {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.portal-panel {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.panel-header i { font-size: 32px; }
.panel-header h2 { font-size: 19px; font-weight: 700; }
.panel-header p { font-size: 13px; color: #94a3b8; }

.form-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.form-field {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.flex-2 { flex: 2; }

.form-field label {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 600;
}

.form-field input, .form-field select, .form-field textarea {
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  outline: none;
  font-size: 13.5px;
}

.form-field input:focus, .form-field select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

/* Blueprint Pattern Customizer Box */
.blueprint-card {
  background: rgba(56, 189, 248, 0.03);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0;
}

.blueprint-title {
  color: #38bdf8;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.blueprint-grid input {
  background: rgba(0, 0, 0, 0.5);
  font-weight: 700;
  color: #38bdf8;
}

.questions-zone {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}

.q-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.q-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.q-row textarea {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 13.5px;
  resize: vertical;
}

.btn-secondary {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid #6366f1;
  color: #a5b4fc;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.remove-btn {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
}

/* ================= PRINTABLE A4 CANVAS TEMPLATE ================= */
#printablePaperTemplate {
  display: none;
  width: 794px;
  background: #ffffff;
  color: #1e293b;
  padding: 40px 48px;
  box-sizing: border-box;
}

.paper-school-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.paper-school-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
}

.paper-school-header p {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-top: 4px;
}

.paper-meta-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #cbd5e1;
  padding: 6px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 14px;
}

.paper-instructions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 18px;
}

.paper-q-block {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #0f172a;
}