/* ===========================================================
   Sócias por Inteiro — identidade visual
   Copper / terracota quente · cream · serifa elegante
   Premium · feminina · acolhedora · mobile-first
   =========================================================== */

:root {
  /* Base cream */
  --bg: #f6ece1;
  --bg-soft: #f1e2d3;
  --card: #fffaf4;
  --ink: #3a2417;
  --ink-soft: #8a6c56;
  --line: #ecdcc9;

  /* Copper / terracota (da identidade) */
  --copper: #c85e2c;
  --copper-deep: #9b3c17;
  --copper-dark: #7a2e12;
  --copper-light: #e08a52;
  --ember: #d97636;
  --gold: #d8a463;
  --gold-soft: #f0d9b4;

  /* Gradientes */
  --grad: linear-gradient(135deg, #b8481f 0%, #d97636 55%, #e3954f 100%);
  --grad-deep: radial-gradient(120% 120% at 30% 10%, #d97636 0%, #8f3415 55%, #6d2710 100%);
  --grad-cta: linear-gradient(135deg, #c2521f 0%, #df7a38 100%);
  --grad-gold: linear-gradient(135deg, #e7bd80 0%, #cf9450 100%);
  --metal: linear-gradient(180deg, #fff7ee 0%, #f4e6d3 38%, #e9d2b4 55%, #fbf4ea 100%);

  --shadow: 0 14px 38px rgba(122, 46, 18, 0.16);
  --shadow-sm: 0 6px 18px rgba(122, 46, 18, 0.10);
  --shadow-cta: 0 10px 24px rgba(184, 72, 31, 0.32);
  --radius: 24px;
  --radius-sm: 15px;

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(224, 138, 82, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 92% 4%, rgba(200, 94, 44, 0.32) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(216, 164, 99, 0.28) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; }
a { color: var(--copper-deep); }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 18px; }
.wrap-wide { max-width: 1100px; }
.hidden { display: none !important; }

/* ---------- Marca / logotipo ---------- */
.brand-title {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  line-height: 1.05;
}
.brand-title span { display: block; font-style: italic; font-weight: 600; }

.accel-pill {
  display: inline-block;
  font-family: var(--font);
  font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad-cta);
  padding: 7px 18px; border-radius: 999px;
  box-shadow: var(--shadow-cta);
}

.days-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 70px; height: 70px; border-radius: 18px;
  border: 2px solid rgba(255,255,255,.55);
  background: var(--grad-cta);
  color: #fff; box-shadow: var(--shadow-cta);
  font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1;
}
.days-badge small { font-family: var(--font); font-size: 10px; letter-spacing: .22em; font-weight: 600; margin-top: 2px; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--grad);
  background-image:
    radial-gradient(130% 90% at 25% 0%, rgba(255, 210, 170, .55) 0%, transparent 45%),
    radial-gradient(120% 120% at 85% 100%, rgba(109, 39, 16, .65) 0%, transparent 55%),
    var(--grad);
}
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 30px;
  width: 100%; max-width: 430px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.6);
}
.brand-badge {
  width: 76px; height: 76px; border-radius: 22px;
  margin: 0 auto 16px;
  background: var(--grad-cta);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); color: #fff; font-size: 32px; font-weight: 700;
  box-shadow: var(--shadow-cta);
  border: 2px solid rgba(255,255,255,.5);
}
.login-card .accel-pill { margin-bottom: 16px; }
.login-card h1, .login-card .brand-title { font-size: 32px; color: var(--copper-deep); }
.login-card .sub { color: var(--ink-soft); font-size: 15px; margin: 10px 0 24px; }

label { display: block; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }

input, textarea, select {
  width: 100%;
  font-family: var(--font); font-size: 16px; color: var(--ink);
  background: #fdf7f0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(200, 94, 44, .15);
}
textarea { resize: vertical; min-height: 96px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 16px;
  border: none; border-radius: 999px; cursor: pointer;
  padding: 15px 26px; width: 100%;
  background: var(--grad-cta); color: #fff;
  box-shadow: var(--shadow-cta);
  transition: transform .12s ease, filter .2s, opacity .2s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: var(--grad-gold); color: #5a3c16; box-shadow: 0 8px 20px rgba(207,148,80,.35); }
.btn-outline { background: transparent; color: var(--copper-deep); border: 1.5px solid var(--copper-light); box-shadow: none; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); box-shadow: none; }
.btn-sm { padding: 10px 18px; font-size: 14px; width: auto; }
.btn-danger { background: #c0492f; color: #fff; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row .btn { width: auto; flex: 1; min-width: 150px; }

.mt { margin-top: 16px; }
.mt-lg { margin-top: 26px; }

/* ---------- Mensagens ---------- */
.msg { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14.5px; margin-top: 16px; text-align: left; }
.msg-error { background: #fdece6; color: #a23a1f; border: 1px solid #f6d2c4; }
.msg-ok { background: #eaf6ea; color: #2f7a44; border: 1px solid #cfe9d4; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 250, 244, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 720px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.topbar .logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; color: var(--copper-deep); font-size: 18px; }
.topbar .logo .dot { width: 36px; height: 36px; border-radius: 11px; background: var(--grad-cta); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: var(--shadow-sm); }
.link-btn { background: none; border: none; color: var(--ink-soft); font-family: var(--font); font-size: 14px; cursor: pointer; font-weight: 600; }
.link-btn:hover { color: var(--copper); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  padding: 22px;
  margin-bottom: 18px;
}
.card-hero {
  background: var(--grad);
  background-image:
    radial-gradient(120% 100% at 85% 0%, rgba(255,210,170,.4) 0%, transparent 50%),
    radial-gradient(120% 120% at 0% 100%, rgba(109,39,16,.5) 0%, transparent 55%),
    var(--grad);
  color: #fff; border: none;
  box-shadow: var(--shadow);
}
.card-hero h1, .card-hero .brand-title { font-size: 25px; }
.card-hero .welcome { opacity: .94; font-size: 15px; margin-top: 4px; }

/* ---------- Barra de progresso ---------- */
.progress-shell { margin-top: 18px; }
.progress-track { background: rgba(255,255,255,.32); border-radius: 999px; height: 14px; overflow: hidden; }
.card .progress-track { background: var(--bg-soft); }
.progress-fill { height: 100%; border-radius: 999px; background: var(--grad-gold); transition: width .6s cubic-bezier(.2,.8,.2,1); width: 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 13.5px; margin-top: 8px; }
.card-hero .progress-label { opacity: .96; }

.stats { display: flex; gap: 12px; margin-top: 18px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center; box-shadow: var(--shadow-sm); }
.stat .num { font-family: var(--serif); font-size: 26px; color: var(--copper-deep); font-weight: 700; }
.stat .lbl { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Rotina do dia ---------- */
.today-tag { display: inline-block; background: var(--gold-soft); color: #8a5e22; font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.today-title { font-size: 22px; margin: 10px 0 6px; color: var(--copper-deep); }
.today-obj { color: var(--ink-soft); font-size: 15px; }
.next-hint { margin-top: 14px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 10px 14px; border-radius: 12px; font-size: 14px; }

/* ---------- Grade de dias ---------- */
.section-title { font-family: var(--serif); font-size: 19px; color: var(--copper-deep); margin: 8px 4px 4px; }
.muted-note { color: var(--ink-soft); font-size: 13.5px; margin: 0 4px 14px; }
.days-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.day-cell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center; cursor: pointer; position: relative;
  transition: transform .12s, box-shadow .2s, border-color .2s;
}
.day-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--copper-light); }
.day-cell .dn { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); }
.day-cell .dl { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.day-cell.done { background: linear-gradient(135deg, #fffaf4 55%, var(--gold-soft)); border-color: var(--gold-soft); }
.day-cell.done .seal { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; background: var(--grad-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5a3c16; }
.day-cell.current { border: 2px solid var(--copper); box-shadow: 0 0 0 4px rgba(200,94,44,.12); }
.day-cell.locked { cursor: default; opacity: .72; background: #f3e9dd; }
.day-cell.locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
.day-cell.locked .dn { color: var(--ink-soft); }
.day-cell .lock { position: absolute; top: 6px; right: 8px; font-size: 13px; opacity: .75; }

/* ---------- Detalhe da rotina ---------- */
.routine-head .today-tag { margin-bottom: 8px; }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); margin: 16px 0; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 14px; text-align: center; padding: 20px; }
.desc { color: var(--ink-soft); font-size: 15.5px; margin: 6px 0 4px; }

/* ---------- Checklist ---------- */
.tasks { list-style: none; margin: 10px 0; }
.task {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fdf7f0; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .2s, background .2s;
}
.task:hover { border-color: var(--copper-light); }
.task.checked { background: #f3f9f3; border-color: #cfe9d4; }
.task .box {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid var(--copper); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; margin-top: 1px; transition: background .2s, border-color .2s;
}
.task.checked .box { background: var(--grad-cta); border-color: var(--copper); }
.task .txt { font-size: 15px; }
.task.checked .txt { text-decoration: line-through; color: var(--ink-soft); }

.reflect-q { font-family: var(--serif); font-size: 17px; color: var(--copper-deep); margin: 18px 0 8px; }
.save-hint { font-size: 13px; color: var(--ink-soft); margin-top: 8px; min-height: 18px; transition: opacity .3s; }

.completed-banner { background: linear-gradient(135deg, #fffaf4, var(--gold-soft)); border: 1px solid var(--gold-soft); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.completed-banner .big { font-size: 26px; }
.completed-banner .t { font-weight: 600; color: #8a5e22; }

/* ---------- Modal de parabéns ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(58, 36, 23, .55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 60; animation: fade .25s ease; }
.modal { background: var(--card); border-radius: var(--radius); padding: 34px 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.2,.9,.3,1.3); }
.modal .celebrate { font-size: 54px; }
.modal h2 { color: var(--copper-deep); margin: 10px 0; font-size: 24px; }
.modal p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(12px); } }

/* ---------- Tela de formação ---------- */
.graduation { text-align: center; padding: 28px 6px; }
.graduation .crown { font-size: 64px; }
.graduation h1 { font-size: 30px; color: #fff; margin: 8px 0; }
.graduation p { color: rgba(255,255,255,.95); font-size: 16px; max-width: 460px; margin: 0 auto; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.tab.active { background: var(--grad-cta); color: #fff; border-color: transparent; box-shadow: var(--shadow-cta); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow-sm); }
.kpi .v { font-family: var(--serif); font-size: 30px; color: var(--copper-deep); font-weight: 700; }
.kpi .k { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
tr:hover td { background: #fdf7f0; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-green { background: #eaf6ea; color: #2f7a44; }
.pill-gray { background: #efe6db; color: #8a7259; }
.pill-gold { background: var(--gold-soft); color: #8a5e22; }

.mini-bar { background: var(--bg-soft); border-radius: 999px; height: 8px; width: 90px; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-bar span { display: block; height: 100%; background: var(--grad-gold); }

.admin-routine { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; background: var(--card); }
.admin-routine summary { cursor: pointer; font-weight: 600; color: var(--copper-deep); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.admin-routine summary::-webkit-details-marker { display: none; }
.task-edit-row { display: flex; gap: 8px; margin-bottom: 8px; }
.task-edit-row input { flex: 1; }
.task-edit-row button { flex: 0 0 auto; }

.comment-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.comment-card .meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.comment-card .body { font-size: 15px; }

.muted { color: var(--ink-soft); font-size: 14px; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--copper); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsivo ---------- */
@media (max-width: 600px) {
  .wrap { padding: 14px; }
  .card { padding: 18px; }
  .stat .num { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .btn-row .btn { min-width: 100%; }
  .card-hero h1, .card-hero .brand-title { font-size: 21px; }
  .today-title { font-size: 19px; }
  .login-card h1, .login-card .brand-title { font-size: 27px; }
}
