/* ═══════════════════════════════════════════════════════════
   FACULDADE · Margarida Martinez — estilos
   (mesma base visual do treinos.margaridamartinez.pt)
   ═══════════════════════════════════════════════════════════ */
@font-face { font-family: 'Jakarta'; font-weight: 400; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 500; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 600; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 700; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair'; font-weight: 600; font-display: swap; src: url(fonts/playfair-display-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair'; font-weight: 700; font-display: swap; src: url(fonts/playfair-display-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair'; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/playfair-display-latin-600-italic.woff2) format('woff2'); }
@font-face { font-family: 'Playfair'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/playfair-display-latin-700-italic.woff2) format('woff2'); }
:root {
  color-scheme: light;
  --bg: #fff7fa;
  --bg2: #fdf0f5;
  --card: #ffffff;
  --card2: #fbe9f0;
  --line: #f4dfe8;
  --line2: #ecccd9;
  --tx: #3a2530;
  --tx2: #7d6270;
  --tx3: #ad94a1;
  --acc: #e84d8a;
  --acc-ink: #ffffff;
  --acc-soft: rgba(232, 77, 138, .1);
  --orange: #ec7a5c;
  --amber: #e9a23b;
  --blue: #5b9be6;
  --violet: #9b7fe0;
  --green: #3fb68b;
  --red: #e5484d;
  --r: 20px;
  --r-sm: 12px;
  --shadow: 0 14px 40px rgba(190, 70, 120, .14);
  --soft-shadow: 0 1px 2px rgba(190, 70, 120, .05), 0 6px 18px rgba(190, 70, 120, .06);
  --font: 'Jakarta', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --num: 'Jakarta', system-ui, sans-serif;
  --serif: 'Playfair', Georgia, serif;
  --side: 232px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 15px; line-height: 1.45; }
body { min-height: 100vh; overflow-x: hidden; word-spacing: .06em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
a { color: var(--acc); }
::selection { background: var(--acc); color: var(--acc-ink); }
.muted { color: var(--tx2); }
.dim { color: var(--tx3); }
.center { text-align: center; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ─────────── Layout ─────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; }
.brand span { font-family: var(--serif); font-weight: 700; font-style: italic; font-size: 22px; }
.brand.sm { padding: 0; }
.brand.sm img { width: 28px; height: 28px; }
.brand.sm span { font-size: 19px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--tx2); text-decoration: none; font-weight: 600; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s; position: relative;
}
.nav a:hover, .nav-btn:hover { background: var(--bg2); color: var(--tx); }
.nav a.on { background: var(--acc-soft); color: var(--acc); }
.nav a .cnt { margin-left: auto; font-size: 11px; font-weight: 800; background: var(--acc); color: #fff; border-radius: 99px; padding: 1px 7px; font-family: var(--num); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-foot form { margin: 0; }

.top {
  display: none; position: sticky; top: 0; z-index: 15;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: rgba(255, 247, 250, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between;
}
.top-right { display: flex; align-items: center; gap: 8px; }
.main { margin-left: var(--side); padding: 28px 32px 100px; max-width: calc(1180px + var(--side)); }
.view { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.fab {
  display: none; position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 58px; height: 58px; border-radius: 19px; border: 0;
  background: var(--acc); color: #fff; place-items: center; box-shadow: 0 12px 28px rgba(232, 77, 138, .38);
  transition: transform .15s;
}
.fab:hover { transform: translateY(-2px) rotate(90deg); }
.fab:active { transform: scale(.94); }
.fab svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .side { inset: auto 0 0 0; width: auto; height: calc(66px + var(--safe-b)); flex-direction: row; padding: 6px 8px var(--safe-b); border-right: 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .side .brand, .side .side-foot, .side .side-new { display: none; }
  .fab { display: grid; }
  .hide-m { display: none !important; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 4px; flex: 1; align-items: center; }
  .nav a.on { background: none; }
  .nav a.on svg { filter: drop-shadow(0 0 8px rgba(232, 77, 138, .45)); }
  .nav a .cnt { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; font-size: 10px; padding: 0 5px; }
  .top { display: flex; }
  .main { margin-left: 0; padding: 16px 16px calc(150px + var(--safe-b)); }
  .fab { right: 16px; bottom: calc(80px + var(--safe-b)); width: 54px; height: 54px; border-radius: 17px; }
}

/* ─────────── Elementos ─────────── */
.h1 { font-family: var(--serif); font-size: 32px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tx3); margin: 0 0 12px; }
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head .h3 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--soft-shadow); }
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.side-new { margin: 0 0 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.sp { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card2); font-weight: 650; font-size: 14px; transition: transform .1s, background .15s, border-color .15s;
  white-space: nowrap; text-decoration: none; color: var(--tx);
}
.btn:hover { border-color: var(--tx3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); box-shadow: 0 6px 16px rgba(232, 77, 138, .28); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; }
.btn.white { background: #fff; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--tx2); flex: none; }
.icon-btn:hover { color: var(--tx); border-color: var(--line2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); background: var(--acc-soft); }
.link { background: none; border: 0; color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link:hover { color: var(--tx); }

.inp, .sel, textarea.inp {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 11px;
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp:focus, .sel:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.inp.big { padding: 14px 16px; font-size: 17px; }
textarea.inp { resize: vertical; min-height: 64px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); margin: 0 0 6px; }
.lbl small { color: var(--tx3); font-weight: 500; }
.field { margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--tx2); white-space: nowrap; }
.pill svg { width: 14px; height: 14px; }
.pill.sub { background: color-mix(in srgb, var(--sc, var(--acc)) 12%, #fff); border-color: color-mix(in srgb, var(--sc, var(--acc)) 30%, transparent); color: color-mix(in srgb, var(--sc, var(--acc)) 80%, #3a2530); }
.pill.sub::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sc, var(--acc)); }

.progress { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress.thin { height: 5px; }

/* Urgência */
.urg { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.urg::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.urg.late { background: rgba(229, 72, 77, .12); color: var(--red); }
.urg.hot { background: var(--acc-soft); color: var(--acc); }
.urg.hot::before { animation: blink 1.4s ease infinite; }
.urg.soon { background: rgba(233, 162, 59, .14); color: #b9771a; }
.urg.calm { background: rgba(91, 155, 230, .12); color: #3f7cc4; }
.urg.nodate { background: var(--card2); color: var(--tx3); }
@keyframes blink { 50% { opacity: .25; } }

/* Segmented */
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 13px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--tx2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--tx); box-shadow: var(--soft-shadow); }

/* ─────────── Agora ─────────── */
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet .date { color: var(--tx3); font-weight: 600; font-size: 13px; }
.greet .date::first-letter { text-transform: uppercase; }
.quote { margin-top: 6px; color: var(--tx2); max-width: 640px; font-family: var(--serif); font-style: italic; font-size: 17px; }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--wc, var(--acc)) 20%, transparent) 0%, transparent 60%), #fff;
  border: 1px solid color-mix(in srgb, var(--wc, var(--acc)) 30%, var(--line)); box-shadow: var(--soft-shadow);
}
.hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 38px solid color-mix(in srgb, var(--wc, var(--acc)) 9%, transparent); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wc, var(--acc)); display: flex; align-items: center; gap: 8px; }
.hero .title { font-family: var(--serif); font-size: 34px; font-weight: 700; font-style: italic; letter-spacing: -.01em; margin: 6px 0 4px; line-height: 1.15; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.hero .why { margin: 16px 0 0; padding: 12px 14px; background: rgba(255, 255, 255, .8); border: 1px dashed var(--line2); border-radius: 14px; font-size: 14px; color: var(--tx2); }
.hero .why b { color: var(--tx); }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero .btn.primary { background: var(--wc, var(--acc)); border-color: var(--wc, var(--acc)); color: #fff; }
.hero.empty-hero { --wc: var(--violet); }

.next-step { margin-top: 16px; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.next-step .lab { font-size: 11px; font-weight: 800; color: var(--wc, var(--acc)); text-transform: uppercase; letter-spacing: .08em; }
.next-step .t { font-weight: 650; }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--soft-shadow); }
.stat .k { font-size: 12px; font-weight: 600; color: var(--tx3); display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 15px; height: 15px; }
.stat .v { font-family: var(--num); font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .v small { font-size: 15px; color: var(--tx3); font-weight: 500; }
.stat .s { font-size: 12px; color: var(--tx2); }
.stat.red .k { color: var(--red); }
.stat.pink .k { color: var(--acc); }
.stat.fire .k { color: var(--orange); }

/* Semana (faixa de 7 dias) */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wd { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; position: relative; box-shadow: var(--soft-shadow); cursor: pointer; min-width: 0; }
.wd .d { font-size: 11px; color: var(--tx3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.wd .n { font-family: var(--num); font-size: 20px; font-weight: 800; margin: 2px 0 6px; }
.wd .dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; min-height: 8px; }
.wd .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--acc)); }
.wd.today { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.wd.has-big .n { color: var(--acc); }
.wd .lbl2 { font-size: 10px; color: var(--tx3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .wd { padding: 8px 2px; } .wd .n { font-size: 16px; } .wd .lbl2 { display: none; } }

/* ─────────── Lista de prioridades ─────────── */
.plist { display: flex; flex-direction: column; gap: 10px; }
.pi {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 14px 14px;
  box-shadow: var(--soft-shadow); position: relative; overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s;
}
.pi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sc, var(--line2)); }
.pi:hover { border-color: var(--line2); transform: translateY(-1px); }
.pi .rank { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: 15px; background: var(--card2); color: var(--tx2); flex: none; }
.pi.first .rank { background: var(--acc); color: #fff; box-shadow: 0 6px 14px rgba(232, 77, 138, .3); transform: rotate(-4deg); }
.pi .t { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.pi .m { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.pi .m .pill { padding: 2px 8px; font-size: 11px; }
.pi .bar { margin-top: 9px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--tx3); font-weight: 600; }
.pi .bar .progress { flex: 1; max-width: 220px; }
.pi .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pi .when { font-family: var(--num); font-weight: 800; font-size: 13px; color: var(--tx2); text-align: right; white-space: nowrap; }
.pi .when small { display: block; font-weight: 600; color: var(--tx3); font-size: 11px; }
.pi.done { opacity: .55; }
.pi.done .t { text-decoration: line-through; }
.pi .tools { display: flex; gap: 4px; }
@media (max-width: 640px) {
  .pi { grid-template-columns: auto 1fr; padding: 12px 12px 12px 12px; gap: 12px; }
  .pi .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 50px; }
  .pi .when { text-align: left; }
  .pi .when small { display: inline; margin-left: 6px; }
}
.type-ic { width: 16px; height: 16px; }

.legend-prio { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--tx3); }

/* Despejo de ideias (inbox) */
.dump-in { display: flex; gap: 8px; }
.dump-list { display: flex; flex-direction: column; margin-top: 10px; }
.dump-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dump-item:last-child { border-bottom: 0; }
.dump-item .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ─────────── Calendário ─────────── */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-head .h2 { font-family: var(--serif); font-style: italic; font-size: 24px; text-transform: capitalize; min-width: 180px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 4px 0; }
.cal .c { min-height: 104px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; transition: border-color .15s; }
.cal .c:hover { border-color: var(--line2); }
.cal .c.out { opacity: .4; }
.cal .c.today { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.cal .c.sel { background: var(--bg2); border-color: var(--tx3); }
.cal .c .n { font-family: var(--num); font-weight: 800; font-size: 13px; color: var(--tx2); padding: 0 2px 2px; }
.cal .c.today .n { color: var(--acc); }
.cal .ev { font-size: 11px; font-weight: 650; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--sc, var(--acc)) 14%, #fff); color: color-mix(in srgb, var(--sc, var(--acc)) 75%, #3a2530); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--sc, var(--acc)); }
.cal .ev.done { opacity: .45; text-decoration: line-through; }
.cal .ev.start { background: transparent; border-left-style: dashed; color: var(--tx3); }
.cal .more { font-size: 10px; color: var(--tx3); font-weight: 700; padding-left: 4px; }
@media (max-width: 700px) {
  .cal { gap: 3px; }
  .cal .c { min-height: 56px; padding: 4px 3px; border-radius: 10px; align-items: center; }
  .cal .ev { font-size: 0; padding: 0; width: 7px; height: 7px; border-radius: 50%; border: 0; background: var(--sc, var(--acc)); display: inline-block; }
  .cal .ev.start { display: none; }
  .cal .evs { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
  .cal .more { display: none; }
}

/* ─────────── Cadeiras ─────────── */
.subj { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--soft-shadow); }
.subj-head { padding: 16px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 14%, transparent), transparent 60%); }
.subj-badge { width: 46px; height: 46px; border-radius: 14px; background: var(--sc); color: #fff; display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: 13px; flex: none; letter-spacing: .02em; }
.subj-head .t { font-weight: 800; font-size: 16px; }
.subj-head .f { font-size: 12px; color: var(--tx2); }
.subj-body { padding: 12px 18px 16px; }
.subj-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.subj-row:last-child { border-bottom: 0; }
.subj-row .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.subj-row .d { font-size: 12px; color: var(--tx3); font-family: var(--num); font-weight: 700; white-space: nowrap; }
.subj-row.done .t { text-decoration: line-through; color: var(--tx3); }

/* ─────────── Modal ─────────── */
#overlay:empty { display: none; }
.modal-bg { position: fixed; inset: 0; background: rgba(70, 30, 50, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { max-width: 640px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.modal-head .h2 { font-family: var(--serif); font-style: italic; font-size: 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + var(--safe-b)); max-height: 92vh; max-height: 92dvh; animation: up .28s cubic-bezier(.2, .9, .3, 1); }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line2); }
.swatches button.on { box-shadow: 0 0 0 2px var(--tx); }

.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.choice button { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); font-weight: 650; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--tx2); }
.choice button svg { width: 18px; height: 18px; }
.choice button.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.choice.three { grid-template-columns: repeat(3, 1fr); }
.choice.three button small { font-weight: 500; font-size: 11px; color: var(--tx3); }
.choice .bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.choice .bars i { width: 6px; border-radius: 2px; background: currentColor; opacity: .25; }
.choice .bars i.f { opacity: 1; }

.weight-row { display: flex; align-items: center; gap: 12px; }
.weight-row input[type=range] { flex: 1; accent-color: var(--acc); }
.weight-row .val { font-family: var(--num); font-weight: 800; min-width: 56px; text-align: right; color: var(--acc); }

.toggles { display: flex; flex-direction: column; gap: 8px; }
.tg { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line2); background: var(--bg2); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.tg small { display: block; font-weight: 500; color: var(--tx3); font-size: 12px; }
.tg input { display: none; }
.tg .sw { margin-left: auto; width: 40px; height: 24px; border-radius: 99px; background: var(--line2); position: relative; transition: background .2s; flex: none; }
.tg .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.tg input:checked + .sw { background: var(--acc); }
.tg input:checked + .sw::after { transform: translateX(16px); }

.steps-edit { display: flex; flex-direction: column; gap: 6px; }
.step-e { display: flex; align-items: center; gap: 8px; }
.step-e .inp { padding: 8px 10px; }
.step-e.done .inp { text-decoration: line-through; color: var(--tx3); }
.chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line2); background: #fff; display: grid; place-items: center; flex: none; color: transparent; transition: all .15s; padding: 0; }
.chk svg { width: 14px; height: 14px; }
.chk.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.chk.big { width: 32px; height: 32px; border-radius: 10px; }
.chk.big svg { width: 17px; height: 17px; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.suggest button { border: 1px dashed var(--line2); background: none; border-radius: 99px; padding: 4px 10px; font-size: 12px; color: var(--tx2); font-weight: 600; }
.suggest button:hover { border-color: var(--acc); color: var(--acc); }

/* Detalhe */
.det-steps { display: flex; flex-direction: column; }
.det-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.det-step:last-child { border-bottom: 0; }
.det-step .t { flex: 1; font-weight: 600; }
.det-step.done .t { text-decoration: line-through; color: var(--tx3); }
.det-notes { white-space: pre-wrap; font-size: 14px; color: var(--tx2); background: var(--bg2); border-radius: 12px; padding: 12px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.kv div { background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.kv b { display: block; font-family: var(--num); font-size: 16px; }
.kv span { font-size: 11px; color: var(--tx3); font-weight: 600; }

/* ─────────── Modo foco ─────────── */
.fm { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto; animation: fade .2s ease; }
.fm-top { position: sticky; top: 0; z-index: 3; padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px; background: rgba(255, 247, 250, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.fm-top .row { max-width: 760px; margin: 0 auto; }
.fm-title { font-weight: 800; font-size: 17px; line-height: 1.25; }
.fm-sub { font-size: 12px; color: var(--tx3); }
.fm-body { max-width: 760px; margin: 0 auto; padding: 22px 16px 60px; }
.timer { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0 20px; }
.ring-wrap { position: relative; width: 240px; height: 240px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-wrap .c b { font-family: var(--num); font-size: 54px; font-weight: 800; display: block; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-wrap .c span { font-size: 12px; color: var(--tx3); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.ring-wrap .track { stroke: var(--card2); }
.ring-wrap .arc { stroke: var(--acc); transition: stroke-dashoffset 1s linear, stroke .3s; }
.timer.pause .arc { stroke: var(--violet); }
.timer.pause .c span { color: var(--violet); }
.timer-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.focus-step { background: #fff; border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line)); box-shadow: 0 0 0 4px var(--acc-soft); border-radius: 20px; padding: 18px; text-align: center; }
.focus-step .lab { font-size: 11px; font-weight: 800; color: var(--acc); text-transform: uppercase; letter-spacing: .1em; }
.focus-step .t { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 26px; margin: 6px 0 14px; line-height: 1.2; }
.sessions { display: flex; gap: 6px; justify-content: center; }
.sessions i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.sessions i.f { background: var(--acc); }

/* ─────────── Progresso ─────────── */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 15px); grid-auto-columns: 15px; justify-content: start; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 15px; height: 15px; border-radius: 4px; background: #f6e3eb; display: block; }
.heat i.l1 { background: color-mix(in srgb, var(--acc) 30%, var(--card2)); }
.heat i.l2 { background: color-mix(in srgb, var(--acc) 60%, var(--card2)); }
.heat i.l3 { background: var(--acc); }
.heat i.fut { opacity: .25; }
.heat i.today { outline: 2px solid var(--tx2); outline-offset: 1px; }
.legend { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--tx3); margin-top: 8px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--tx3); font-size: 11px; font-family: var(--num); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--acc); opacity: .55; }
.chart .bar.cur { opacity: 1; }
.empty { text-align: center; color: var(--tx3); padding: 30px 10px; font-size: 14px; }
.empty b { display: block; color: var(--tx2); font-size: 15px; margin-bottom: 4px; }

.hist-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hist-item:last-child { border-bottom: 0; }
.hist-item .b { width: 38px; height: 38px; border-radius: 12px; background: var(--sc, var(--card2)); color: #fff; display: grid; place-items: center; flex: none; }
.hist-item .b svg { width: 18px; height: 18px; }
.hist-item .t { font-weight: 650; }
.hist-item .s { font-size: 12px; color: var(--tx3); }

.lvl-card { display: flex; align-items: center; gap: 18px; }
.lvl-num { width: 72px; height: 72px; border-radius: 22px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 30px; flex: none; transform: rotate(-4deg); box-shadow: 0 10px 30px rgba(232, 77, 138, .3); }

/* ─────────── Toast / loader / confetti ─────────── */
.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; z-index: 90; background: var(--card2); border: 1px solid var(--line2); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.1); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.err { border-color: var(--red); color: var(--red); }
.loader { display: grid; place-items: center; height: 60vh; }
.loader div { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; width: 100%; height: 100%; }

/* ─────────── Login ─────────── */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; position: relative; overflow: hidden; }
.login-bg span { position: fixed; border-radius: 50%; filter: blur(80px); animation: float 14s ease-in-out infinite alternate; }
.login-bg span:nth-child(1) { width: 420px; height: 420px; background: var(--acc); top: -160px; left: -120px; opacity: .28; }
.login-bg span:nth-child(2) { width: 360px; height: 360px; background: #ffb38a; bottom: -140px; right: -100px; animation-delay: -5s; opacity: .25; }
.login-bg span:nth-child(3) { width: 260px; height: 260px; background: var(--violet); top: 40%; left: 55%; animation-delay: -9s; opacity: .2; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.1); } }
.login-card { position: relative; width: 100%; max-width: 400px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line2); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 14px; box-shadow: 0 8px 22px rgba(232, 77, 138, .3); }
.login-title { font-family: var(--serif); font-size: 26px; font-weight: 700; font-style: italic; letter-spacing: -.01em; }
.login-sub { font-size: 13px; color: var(--tx3); }
.login-form .btn { margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--tx3); padding: 8px; }
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: 600; color: var(--tx3); }
.step { display: flex; align-items: center; gap: 7px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-size: 11px; }
.step.on { color: var(--tx); }
.step.on i { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.step.done i { background: var(--acc-soft); color: var(--acc); border-color: transparent; }
.step-line { flex: 1; height: 1px; background: var(--line2); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.otp input { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font-family: var(--num); font-size: 24px; font-weight: 700; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; outline: none; }
.otp input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.trust { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--tx2); cursor: pointer; }
.trust input { accent-color: var(--acc); width: 16px; height: 16px; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.login-links form { margin: 0; }
.login-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--tx3); margin: 0; }
.alert { padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert.err { background: rgba(255, 93, 108, .08); border-color: rgba(255, 93, 108, .35); color: #c92f45; }
.alert.ok { background: var(--acc-soft); border-color: rgba(232, 77, 138, .3); color: var(--acc); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
