/* Girl Math, Girl Metas: app styles (on top of brand/brand.css + social.css) */
body { background: var(--page); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 72px; }
h1 { text-align: center; }
h2 { font-family: "Noto Serif Display", Georgia, serif; font-weight: 300; letter-spacing: .1em; font-size: 26px; margin: 0 0 18px; }
.script { font-family: "Noto Serif Display", Georgia, serif; font-style: italic; font-weight: 300; letter-spacing: 0; text-transform: none; }

/* nav extras */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.nav-links .lang-switch button { padding: 5px 8px; border: 0; letter-spacing: .1em; }
.nav-links .lang-switch button[aria-pressed="true"] { background: var(--purple); color: var(--cream); }

/* hero / balance */
.hero { text-align: center; padding: 6px 0 26px; }
.hero h1 { margin: 6px 0 4px; font-size: clamp(28px, 5vw, 42px); }
.hero .script-line { font-family: "Noto Serif Display", Georgia, serif; font-style: italic; font-weight: 300; font-size: 24px; margin: 0; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.stat {
  background: var(--cream); border: 1px solid var(--line); border-radius: 2px; padding: 16px 14px; text-align: center;
}
.stat .k { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; opacity: .75; }
.stat .v { font-family: "Noto Serif Display", Georgia, serif; font-weight: 300; font-size: 32px; line-height: 1.15; margin-top: 4px; }
.stat .s { font-size: 11px; opacity: .65; margin-top: 2px; }
.stat.main { background: var(--purple); color: var(--cream); border-color: var(--purple); }
.cap-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: var(--purple); transition: width .3s; }
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* tabs */
.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.tabs-bar button {
  flex: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
  padding: 12px 14px; color: var(--purple); opacity: .65; font: 700 11px "Arimo", sans-serif; letter-spacing: .22em; text-transform: uppercase;
}
.tabs-bar button[aria-selected="true"] { opacity: 1; border-bottom-color: var(--purple); }
.tabs-bar .pro-tag { position: static; margin-left: 6px; vertical-align: 1px; }

/* day picker (like the sheet's Domingo–Sábado columns) */
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 22px; }
.day-picker .lbl { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-right: 6px; }
.day-picker button {
  min-width: 44px; padding: 8px 6px; border: 1px solid var(--line); background: var(--cream); color: var(--purple);
  border-radius: 2px; cursor: pointer; font: 12px "Arimo", sans-serif; text-align: center; line-height: 1.2;
}
.day-picker button small { display: block; font-size: 10px; opacity: .7; }
.day-picker button[aria-pressed="true"] { background: var(--purple); color: var(--cream); border-color: var(--purple); }
.day-picker button:disabled { opacity: .35; cursor: not-allowed; }

/* wins grid */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 760px) { .cats { grid-template-columns: minmax(0, 1fr); } }
.cat { background: var(--cream); border: 1px solid var(--line); border-radius: 2px; padding: 18px 16px; }
.cat h3 { margin: 0 0 12px; font: 700 11px "Arimo", sans-serif; letter-spacing: .24em; text-transform: uppercase; display: flex; justify-content: space-between; }
.cat h3 span:last-child { font-weight: 400; letter-spacing: .05em; text-transform: none; opacity: .7; }
.win {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer;
  color: var(--purple); font: 14px "Arimo", sans-serif; transition: border-color .15s, transform .1s, background .15s;
}
.win:hover { border-color: var(--purple); }
.win:active { transform: scale(.99); }
.win .pts { font: 300 20px "Noto Serif Display", Georgia, serif; white-space: nowrap; }
.win .rep { grid-column: 1; font-size: 11px; opacity: .6; }
.win .count { grid-column: 2; font-size: 11px; text-align: right; opacity: .75; }
.win.done { background: var(--blush); border-color: var(--blush); cursor: default; }
.win.done .pts::before { content: "✓ "; }
.win:disabled { cursor: not-allowed; }

.week-log { margin-top: 30px; }
.week-log ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.week-log li { display: flex; align-items: center; gap: 10px; background: var(--cream); border: 1px solid var(--line); padding: 9px 12px; font-size: 14px; }
.week-log li .d { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; width: 46px; flex: none; }
.week-log li .l { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.week-log li .p { font-weight: 700; }
.week-log li button { background: none; border: 0; color: var(--purple); cursor: pointer; font-size: 12px; text-decoration: underline; opacity: .7; padding: 4px; }
.week-log li .shared { font-size: 11px; opacity: .6; }

/* rewards */
.rewards-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.rewards-head h2 { margin: 0; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.reward {
  background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 18px 16px 14px; position: relative;
  display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 14px rgba(79,69,104,.08);
}
.reward .em { font-size: 30px; line-height: 1; }
.reward .ti { font-family: "Noto Serif Display", Georgia, serif; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.reward .pp { font-size: 12px; opacity: .7; }
.reward .pts { font: 300 26px "Noto Serif Display", Georgia, serif; }
.reward .worth { font-size: 12px; opacity: .75; }
.reward .bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 4px 0; }
.reward .bar i { display: block; height: 100%; background: linear-gradient(90deg, #e86fa8, var(--purple)); }
.reward .row { display: flex; gap: 8px; margin-top: 6px; }
.reward .row .primary { flex: 1; padding: 11px 10px; font-size: 11px; }
.reward .row .ghost { padding: 9px 10px; font-size: 10px; }
.reward.redeemed { opacity: .65; box-shadow: none; }
.reward .stamp { position: absolute; top: 12px; right: 12px; font: 700 10px "Arimo", sans-serif; letter-spacing: .2em; text-transform: uppercase; border: 1px solid; padding: 3px 6px; transform: rotate(6deg); }
.reward .pro-tag { position: absolute; top: 12px; right: 12px; }
details.redeemed-box { margin-top: 26px; }
details.redeemed-box summary { cursor: pointer; font: 700 11px "Arimo", sans-serif; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; }

/* dialogs */
dialog.sheet {
  border: 0; border-radius: 2px; padding: 0; width: min(440px, calc(100vw - 32px)); color: var(--purple); background: var(--cream);
  box-shadow: 0 30px 60px rgba(47,42,56,.35);
}
dialog.sheet::backdrop { background: rgba(47,42,56,.55); }
.sheet-head { background: var(--purple); color: var(--cream); padding: 22px 22px 18px; position: relative; text-align: center; }
.sheet-head h3 { font: 300 24px "Noto Serif Display", Georgia, serif; letter-spacing: .1em; margin: 0; }
.sheet-head p { margin: 6px 0 0; font-size: 13px; opacity: .85; }
.sheet-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--cream); font-size: 22px; cursor: pointer; }
.sheet-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet-body label { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; gap: 7px; }
.sheet-body label small { font-weight: 400; letter-spacing: .04em; text-transform: none; opacity: .7; }
.sheet-body input, .sheet-body select, .sheet-body textarea {
  font: 15px "Arimo", sans-serif; color: var(--purple); letter-spacing: normal; text-transform: none;
  border: 1px solid var(--line); background: #fff; border-radius: 2px; padding: 11px 12px; width: 100%;
}
.price-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: #fff; color: var(--purple); padding: 8px 12px; border-radius: 20px; cursor: pointer; font: 13px "Arimo", sans-serif; }
.chips button[aria-pressed="true"] { background: var(--purple); color: var(--cream); border-color: var(--purple); }
.emojis button { font-size: 20px; padding: 5px 8px; border-radius: 6px; }
.preview-pts { background: #fff; border: 1px dashed var(--purple); padding: 12px; text-align: center; }
.preview-pts .n { font: 300 30px "Noto Serif Display", Georgia, serif; }
.preview-pts .w { font-size: 12px; opacity: .75; }
.preview-pts .k { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.sheet-body .btns { display: flex; gap: 8px; }
.sheet-body .btns > * { flex: 1; }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.up-list li { display: flex; gap: 10px; align-items: center; }
.code-box { background: #fff; border: 1px dashed var(--purple); padding: 14px; font: 16px ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }

/* pro */
.pro-tag { display: inline-block; background: var(--purple); color: var(--cream); border-radius: 2px; font: 700 9px "Arimo", sans-serif; letter-spacing: .14em; padding: 3px 5px 2px 6px; }
.pro-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--purple); color: var(--cream); padding: 14px 16px; border-radius: 2px; margin-bottom: 22px; font-size: 13px; }
.pro-banner strong { font: 400 18px "Noto Serif Display", Georgia, serif; letter-spacing: .04em; display: block; }
.pro-banner button { background: var(--cream); color: var(--purple); border: 0; padding: 10px 14px; font: 700 11px "Arimo", sans-serif; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; border-radius: 2px; }
.pro-banner.member { background: var(--cream); color: var(--purple); border: 1px solid var(--line); }
.tick { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; }
.locked { position: relative; }
.locked .blur { filter: blur(5px); pointer-events: none; user-select: none; opacity: .6; }
.locked .lock-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 16px; }

/* stats */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 10px 0 0; border-bottom: 1px solid var(--line); }
.chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.chart .b i { display: block; width: 100%; background: linear-gradient(180deg, #9f82bf, var(--purple)); border-radius: 2px 2px 0 0; min-height: 2px; }
.chart .b span { font-size: 10px; opacity: .7; }
.chart-x { display: flex; gap: 6px; margin-top: 6px; }
.chart-x span { flex: 1; text-align: center; font-size: 9px; opacity: .6; min-width: 0; overflow: hidden; white-space: nowrap; }
.cat-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cat-bars div { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.cat-bars i { display: block; height: 10px; background: var(--purple); border-radius: 2px; }
.panel { background: var(--cream); border: 1px solid var(--line); border-radius: 2px; padding: 20px 18px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 12px; font: 700 11px "Arimo", sans-serif; letter-spacing: .24em; text-transform: uppercase; }

/* feed win card */
.win-card { position: relative; background: #fff; padding: 42px 24px 26px; text-align: center; box-shadow: 0 14px 26px rgba(79,69,104,.16); }
.post:nth-child(odd) .win-card { transform: rotate(-.6deg); }
.post:nth-child(even) .win-card { transform: rotate(.5deg); }
.win-card .win-tape { position: absolute; top: -14px; left: 50%; width: 120px; transform: translateX(-50%) rotate(-3deg); }
.win-card .win-cat { font: 700 10px "Arimo", sans-serif; letter-spacing: .24em; text-transform: uppercase; opacity: .7; }
.win-card .win-title { font-family: "Noto Serif Display", Georgia, serif; font-style: italic; font-weight: 300; font-size: 24px; margin: 10px 0 4px; line-height: 1.2; }
.win-card .win-points { font: 300 34px "Noto Serif Display", Georgia, serif; margin: 0; }
.win-card .win-points small { font-size: 14px; }
.win-card .win-msg { font-size: 14px; margin: 12px 0 0; opacity: .85; overflow-wrap: anywhere; }
.win-card.cat-criatividade { background: linear-gradient(180deg, #fff, #f8eef6); }
.win-card.cat-consistencia { background: linear-gradient(180deg, #fff, #eef3f8); }
.win-card.cat-engajamento { background: linear-gradient(180deg, #fff, #fbf3e6); }
.win-card.cat-seguidores { background: linear-gradient(180deg, #fff, #eef6f1); }
.comment-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.more-comments { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* toasts */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(440px, calc(100vw - 32px)); }
.toast { background: #2f2a38; color: var(--cream); padding: 12px 14px; border-radius: 2px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.25); transition: opacity .4s, transform .4s; }
.toast button { background: var(--cream); color: var(--purple); border: 0; padding: 7px 10px; font: 700 10px "Arimo", sans-serif; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; border-radius: 2px; flex: none; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* auth screens */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--purple); color: var(--cream); position: relative; }
.auth-card { width: min(400px, 100%); text-align: center; }
.auth-card .logo { width: 220px; max-width: 70%; filter: brightness(0) invert(96%) sepia(6%) saturate(300%); }
.auth-card h1 { color: var(--cream); margin: 18px 0 2px; font-size: clamp(26px, 6vw, 36px); letter-spacing: 0; padding: 0; }
.auth-card .script-line { font-family: "Noto Serif Display", Georgia, serif; font-style: italic; font-weight: 300; font-size: 22px; margin: 0 0 24px; }
.auth-tabs { display: flex; border-bottom: 1px solid rgba(253,250,245,.25); margin-bottom: 22px; }
.auth-tabs button { flex: 1; background: none; border: 0; color: var(--cream); opacity: .6; cursor: pointer; padding: 12px 0; font: 700 11px "Arimo", sans-serif; letter-spacing: .24em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tabs button[aria-selected="true"] { opacity: 1; border-bottom-color: var(--cream); }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form label { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; display: flex; flex-direction: column; gap: 8px; }
.auth-form input, .auth-form select { font: 16px "Arimo", sans-serif; padding: 13px 14px; border-radius: 2px; border: 1px solid rgba(253,250,245,.35); background: rgba(253,250,245,.08); color: var(--cream); letter-spacing: normal; text-transform: none; }
.auth-form select option { color: #2f2a38; }
.auth-form button.primary { background: var(--cream); color: var(--purple); margin-top: 6px; }
.auth-form button.primary:hover { background: #fff; }
.linkish { background: none; border: 0; color: var(--cream); opacity: .85; text-decoration: underline; cursor: pointer; font: 13px "Arimo", sans-serif; padding: 0; align-self: center; }
.auth-msg { min-height: 20px; font-size: 13px; line-height: 1.5; text-align: center; margin: 4px 0 0; }
.auth-msg.error { color: #ffd6dc; }
.auth-screen .lang-switch { position: absolute; top: 16px; right: 16px; border-color: rgba(253,250,245,.4); }
.auth-screen .lang-switch button { background: none; border: 0; color: var(--cream); padding: 6px 9px; cursor: pointer; font: 700 11px "Arimo", sans-serif; }
.auth-screen .lang-switch button[aria-pressed="true"] { background: var(--cream); color: var(--purple); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.setup-note { background: rgba(253,250,245,.1); border: 1px solid rgba(253,250,245,.3); padding: 16px; font-size: 13px; line-height: 1.6; text-align: left; border-radius: 2px; }

/* admin */
table.admin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin th, table.admin td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: middle; }
table.admin th { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
table.admin input, table.admin select, table.admin textarea { width: 100%; font: 13px "Arimo", sans-serif; color: var(--purple); border: 1px solid var(--line); padding: 6px 8px; background: #fff; border-radius: 2px; }
table.admin input[type=number] { width: 80px; }
.scroll-x { overflow-x: auto; }
footer { text-align: center; padding: 8px 16px 40px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; opacity: .6; }
