/* ============================================================
   QUIRIGÓN — style.css
   Paleta: azul #3578C8, escuro #2860A8, âmbar #C07A20
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #3578C8;
  --blue-dark:  #2860A8;
  --blue-light: #F0F7FF;
  --blue-border:#C5DCF4;
  --amber:      #C07A20;
  --amber-bg:   #FEF3C7;
  --amber-border:#FDE68A;
  --text:       #1a1a2e;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --white:      #ffffff;
  --green:      #16a34a;
  --red:        #dc2626;
  --radius:     0.5rem;
  --shadow:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.page {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  background: linear-gradient(135deg, var(--blue-light) 0%, #f5f3ff 100%);
}
.page.active { display: flex; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
main { flex: 1; padding: 2rem 1rem; }

/* ── HEADER ── */
header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
}
.header-left  { display: flex; align-items: center; gap: .75rem; }
.header-right { display: flex; align-items: center; gap: .25rem; }
.user-greeting { font-size: .875rem; color: var(--muted); }

/* ── FOOTER ── */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .75rem;
  font-size: .875rem; color: var(--muted);
}
.footer-inner strong { color: var(--blue-dark); }

/* ── BOTÕES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-outline   { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: #f9fafb; }
.btn-ghost     { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: #f3f4f6; color: var(--text); }
.btn-icon { padding: .4rem; border-radius: var(--radius); }
.btn-lg   { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-sm   { padding: .3rem .75rem; font-size: .8rem; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-full { width: 100%; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius)*1.5);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header { padding: 1.25rem 1.5rem .75rem; }
.card-title  { font-size: 1.125rem; font-weight: 600; }
.card-desc   { font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.card-body   { padding: .75rem 1.5rem 1.5rem; }
.card-dashed {
  border: 2px dashed var(--blue-border);
  background: rgba(240,247,255,.5);
  text-align: center;
}
.card-clickable { cursor: pointer; transition: box-shadow .15s; }
.card-clickable:hover { box-shadow: var(--shadow-md); }

/* ── FORMULÁRIOS ── */
.form-group   { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .25rem; }
.form-label   { font-size: .875rem; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .5rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .875rem; color: var(--text);
  background: var(--white); outline: none; transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,120,200,.15);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: .75rem; color: var(--muted); }
.form-hint-warn {
  font-size: .75rem; color: #92400e;
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: var(--radius); padding: .4rem .625rem;
}
.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.col-span-2 { grid-column: 1 / -1; }

/* ── INPUTS DE SENHA ── */
.input-pw-wrap { position: relative; }
.input-pw-wrap .form-input { padding-right: 2.5rem; }
.pw-toggle {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; padding: .2rem;
}
.pw-toggle:hover { color: var(--text); }

/* ── REQUISITOS DE SENHA ── */
.pw-req { list-style: none; margin-top: .375rem; display: flex; flex-direction: column; gap: .2rem; }
.pw-req li { font-size: .75rem; display: flex; align-items: center; gap: .35rem; color: var(--muted); }
.pw-req li.ok  { color: var(--green); }
.pw-req li .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ── GRID DE STATS ── */
.stats-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-value { font-size: 2rem; font-weight: 700; margin-top: .25rem; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .625rem; border-radius: 999px;
  font-size: .75rem; font-weight: 500;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-amber  { background: var(--amber-bg); color: #92400e; }
.badge-gray   { background: #f3f4f6; color: #374151; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* ── LOGO ── */
.logo-wrap { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.logo-img {
  height: 4rem; /* ou a altura que preferir para as telas de login */
  width: auto;  /* garante que o SVG não distorça a largura */
  object-fit: contain;
}
.logo-slogan { font-size: .875rem; color: var(--muted); text-align: center; max-width: 24rem; }
.logo-inline { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.logo-inline .logo-img { height: 2.5rem; }

/* ── BLOOM LEVELS ── */
.bloom-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.bloom-item { background: var(--white); border-radius: var(--radius); padding: 1rem; }
.bloom-num {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .875rem;
}

/* ── TOASTS ── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem; z-index: 9999;
  pointer-events: none;
}
.toast {
  padding: .75rem 1.25rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; box-shadow: var(--shadow-md);
  animation: slideIn .25s ease; pointer-events: auto;
  max-width: 22rem;
}
.toast-success { background: #166534; color: #fff; }
.toast-error   { background: var(--red); color: #fff; }
.toast-info    { background: var(--blue); color: #fff; }
@keyframes slideIn { from { opacity:0; transform: translateX(100%); } to { opacity:1; transform: translateX(0); } }

/* ── MODAL ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--white); border-radius: calc(var(--radius)*1.5);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%; max-width: 28rem; max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 42rem; }
.modal-header { padding: 1.5rem 1.5rem .75rem; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-desc  { font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.modal-body  { padding: 1.25rem 1.5rem; }
.modal-footer { padding: .75rem 1.5rem 1.5rem; display: flex; gap: .5rem; justify-content: flex-end; }

/* ── ONBOARDING ── */
.onboarding-header {
  padding: 2rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center;
}
.onboarding-icon-wrap {
  width: 5rem; height: 5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.onboarding-steps { display: flex; gap: .5rem; justify-content: center; }
.onboarding-dot {
  height: .5rem; border-radius: 9999px; background: #d1d5db; transition: all .2s;
}
.onboarding-dot.active { width: 2rem; background: var(--blue); }
.onboarding-dot.done  { width: .5rem; background: #93c5fd; }
.onboarding-dot.next  { width: .5rem; }

/* ── OBJETIVOS — bolinhas de reflexão ── */
.reflex-dots { display: flex; gap: .375rem; flex-wrap: wrap; margin-top: .5rem; }
.reflex-dot  { width: .75rem; height: .75rem; border-radius: 50%; }
.reflex-dot-done-sim  { background: var(--green); }
.reflex-dot-done-nao  { background: #eab308; }
.reflex-dot-pending   { background: #d1d5db; }

/* ── CPF confirm highlight ── */
.cpf-confirm {
  display: block; text-align: center;
  font-family: monospace; font-size: 1.1rem; font-weight: 700;
  background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: var(--radius); padding: .6rem 1rem;
  margin: .5rem 0;
}

/* ── RECUPERAR SENHA — estado enviado ── */
.sent-icon { color: var(--green); font-size: 3rem; text-align: center; }

/* ── TURMAS GRID ── */
.turmas-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── SOBRE — bloom grid ── */
.sobre-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ── PERFIL ── */
.perfil-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.perfil-avatar {
  width: 4rem; height: 4rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; font-weight: 700; flex-shrink: 0;
}

/* ── OBJETIVOS LIST ── */
.obj-list { display: flex; flex-direction: column; gap: .75rem; }
.obj-status { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 500; }

/* ── CHECKBOX ── */
.checkbox-row { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.checkbox-row input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--blue); cursor: pointer; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: .75rem; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .col-span-2  { grid-column: auto; }
  .user-greeting { display: none; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .modal { max-width: 100%; margin: 0; border-radius: var(--radius) var(--radius) 0 0; align-self: flex-end; }
  .modal-backdrop { align-items: flex-end; }
}

.dropdown-item {
  padding: .5rem .75rem;
  font-size: .875rem;
  cursor: pointer;
  text-align: left;
  background: var(--white);
  transition: background .1s;
}
.dropdown-item:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
}
