:root {
  color-scheme: light;
  --ink: #33203a;
  --muted: #69596b;
  --accent: #714363;
  --border: #e8dce4;
  --paper: #fcf8f5;
  --pink: #f8e5eb;
  --white: #fffdfa;
  --yellow: #f3cf64;
  --ring: #794675;
  font-family: "Segoe UI", Aptos, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }

.bio {
  background:
    radial-gradient(ellipse at 8% 3%, #f9e3e8 0, transparent 29rem),
    radial-gradient(ellipse at 94% 18%, #f7ecd0 0, transparent 32rem), var(--paper);
}
.bio-inner { width: min(100% - 2rem, 38rem); margin: 0 auto; }
.profile { position: relative; text-align: center; padding: 3.4rem 0 1.7rem; }
.profile-mark {
  width: 5.5rem;
  height: 5.5rem;
  display: inline-grid;
  place-items: center;
  position: relative;
  border-radius: 1.45rem;
  border: 1px solid #e0b83d;
  background: var(--yellow);
  box-shadow: 0 5px 0 #ebba5800, 0 6px 19px #7d4f2c20;
  transform: rotate(-5deg);
  margin-bottom: .8rem;
}
.profile-logo {
  font-size: 1.83rem;
  line-height: .76;
  font-weight: 900;
  letter-spacing: -.095em;
  text-align: left;
  transform: rotate(5deg);
}
.profile-logo span { color: #844476; }
.mark-star { color: #804366; position: absolute; top: .5rem; right: .62rem; font-size: 1rem; }
.profile h1 {
  font: 700 clamp(2.2rem, 8vw, 3.5rem)/1.02 Georgia, "Times New Roman", serif;
  letter-spacing: -.065em;
}
.profile p { color: var(--muted); font-size: 1rem; margin-top: .58rem; }
.share {
  position: absolute;
  top: 1.25rem;
  right: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 50%;
}
.share svg, .tile-next svg { width: 1.1rem; height: 1.1rem; }
.public-section { margin-top: 1.65rem; }
.public-section:first-of-type { margin-top: 0; }
.public-section h2 {
  margin: 0 0 .7rem .15rem;
  font: 700 1.34rem/1.15 Georgia, "Times New Roman", serif;
  letter-spacing: -.02em;
}
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.tiles--colecoes, .tiles--lojas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--redes { display: flex; flex-wrap: wrap; gap: .45rem; }
.tile {
  min-height: 3.6rem;
  min-width: 0;
  padding: .55rem .75rem .55rem .65rem;
  display: flex;
  align-items: center;
  gap: .68rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  text-decoration: none;
  transition: background .15s, border .15s, transform .15s;
}
.tile:hover { background: #fff4f8; border-color: #d4b1c9; transform: translateY(-1px); }
.tile--destaques { min-height: 4.45rem; }
.tile--hero { background: #3a2444; color: #fffafc; border-color: #3a2444; }
.tile--hero:hover { background: #4f3258; border-color: #4f3258; }
.tile-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.42rem;
  height: 2.42rem;
  border-radius: .73rem;
  color: #664061;
  background: #f7e6ef;
}
.tile-icon svg { width: 1.2rem; height: 1.2rem; }
.tile--hero .tile-icon { background: var(--yellow); color: var(--ink); }
.tile--colecoes .tile-icon { background: #f5eccc; color: #725422; }
.tile--lojas .tile-icon { background: #efe6f5; }
.tile--whatsapp .tile-icon { color: #305942; background: #e5f1e6; }
.tile-copy { min-width: 0; overflow-wrap: anywhere; }
.tile-copy strong { display: block; font-size: .96rem; line-height: 1.17; }
.tile-copy small { display: block; color: var(--muted); font-size: .84rem; margin-top: .18rem; line-height: 1.22; }
.tile--hero .tile-copy small { color: #e7d9e5; }
.tile-next { margin-left: auto; color: var(--muted); display: flex; }
.tile--hero .tile-next { color: #f7d674; }
.tile--redes { min-height: 2.7rem; border-radius: 2rem; padding: .35rem .75rem .35rem .45rem; gap: .2rem; }
.tile--redes .tile-icon { flex-basis: 1.65rem; height: 1.65rem; background: transparent; }
.tile--redes .tile-copy strong { font-size: .87rem; }
.public-footer { padding: 1.8rem 0 2.8rem; color: var(--muted); font-size: .85rem; }
.public-footer a { text-underline-offset: .16rem; }
.share-status {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white; padding: .55rem 1rem; border-radius: .5rem; white-space: nowrap;
}
.share-status:empty { display: none; }

.admin { background: #f9f6f7; }
.admin-header {
  min-height: 4rem; padding: .8rem max(1.1rem, calc((100% - 74rem) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  border-bottom: 1px solid var(--border); background: var(--white);
}
.admin-brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; }
.admin-brand small { margin-left: .45rem; color: var(--muted); font-weight: 500; font-size: .88rem; }
.brand-dot { display: inline-grid; place-items: center; flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; background: var(--yellow); border-radius: .45rem; }
.brand-dot::before { content: '✦'; }
.admin-header nav { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; font-weight: 650; font-size: .89rem; }
.admin-header a { text-decoration: none; }
.admin-header a:hover { text-decoration: underline; }
.admin-main { width: min(100% - 2rem, 74rem); margin: 0 auto; padding: 2.1rem 0 3rem; }
.admin-intro h1, .auth-card h1 { font: 700 clamp(2.2rem, 5vw, 3.2rem)/1 Georgia, serif; letter-spacing: -.06em; }
.admin-intro p, .edit-toolbar p { color: var(--muted); margin-top: .45rem; }
.admin-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin: 1.55rem 0 1.1rem; }
.admin-tabs button { border: 0; background: transparent; padding: .75rem .95rem; border-bottom: 2px solid transparent; font-weight: 680; }
.admin-tabs [aria-selected="true"] { border-color: var(--accent); color: var(--accent); }
.section-toolbar { display: flex; align-items: end; justify-content: space-between; gap: .7rem; margin-bottom: .7rem; flex-wrap: wrap; }
.section-toolbar form, #custom-dates, .toolbar-buttons { display: flex; align-items: end; flex-wrap: wrap; gap: .55rem; }
.section-toolbar label, .edit-fields label { display: grid; gap: .26rem; color: var(--muted); font-size: .9rem; font-weight: 650; }
button.secondary, a.secondary, .primary, input:not([type="checkbox"]), select {
  min-height: 2.65rem; padding: .45rem .7rem; border: 1px solid #d9cbd6; border-radius: .55rem;
  color: var(--ink); background: var(--white); line-height: 1.25;
}
.primary, button.secondary, a.secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 680; }
.primary { color: #fff; background: #633b5f; border-color: #633b5f; }
.primary:hover { background: #492647; }
button.secondary:hover, a.secondary:hover { background: #f7e9f0; }
button:disabled { opacity: .5; cursor: default; }
#insights-status:empty, #editor-status:empty { display: none; }
#insights-status, #editor-status { margin: .7rem 0; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: .85rem 0; }
.metric, .panel, .edit-card { border: 1px solid var(--border); border-radius: .9rem; background: var(--white); min-width: 0; }
.metric { display: grid; gap: .35rem; padding: .9rem 1rem; }
.metric span { color: var(--muted); font-size: .92rem; }
.metric strong { font-size: clamp(1.48rem, 4vw, 2.15rem); line-height: 1; }
.panel { padding: 1rem; margin-bottom: .7rem; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.panel h2 { font-size: 1.1rem; }
.panel-heading p, .measurement-note, .empty, .chart-legend { color: var(--muted); font-size: .9rem; }
.insights-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .75rem; align-items: start; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
td, th { text-align: left; padding: .5rem .1rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 650; }
td.numeric, th.numeric { text-align: right; padding-left: .45rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-svg { display: block; width: 100%; max-height: 13rem; overflow: visible; }
.chart-grid { stroke: #ebdfe7; stroke-width: 1; }
.chart-views { fill: none; stroke: #7e506f; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.chart-clicks { fill: none; stroke: #287362; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.chart-text { fill: var(--muted); font: 12px system-ui, sans-serif; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.chart-legend span::before { content: ''; display: inline-block; width: .8rem; height: .18rem; margin: 0 .35rem .2rem 0; background: #7e506f; }
.chart-legend span + span::before { background: #287362; }
.daily-table { margin-top: .8rem; font-size: .88rem; }
.daily-table summary { width: fit-content; cursor: pointer; color: var(--accent); }
.edit-card { padding: .8rem .9rem; margin-bottom: .55rem; }
.edit-heading, .edit-actions, .edit-bottom { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.edit-title { display: block; overflow-wrap: anywhere; }
.edit-state { color: var(--muted); display: block; margin-top: .15rem; font-size: .85rem; }
.edit-actions button { min-height: 2.25rem; font-size: .88rem; }
.edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding-top: .75rem; }
.edit-fields input, .edit-fields select { width: 100%; }
.edit-fields .switch { display: flex; align-items: center; gap: .4rem; }
.edit-fields .switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.edit-bottom { grid-column: 1 / -1; }
.auth-page { display: grid; place-items: center; padding: 1.25rem; background: var(--pink); }
.auth-card { display: grid; justify-items: start; gap: 1rem; background: var(--white); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1.2rem, 6vw, 2.6rem); }
.auth-card p { color: var(--muted); }
.back-link { color: var(--muted); }
@media (max-width: 38rem) {
  .profile { padding-top: 2.5rem; }
  .share { top: .85rem; }
  .tile--colecoes, .tile--lojas { gap: .4rem; padding: .42rem; }
  .tile--colecoes .tile-icon, .tile--lojas .tile-icon { flex-basis: 1.8rem; height: 1.8rem; }
  .tile--colecoes .tile-copy strong, .tile--lojas .tile-copy strong { font-size: .89rem; }
  .tile--colecoes .tile-next, .tile--lojas .tile-next { display: none; }
  .admin-brand small { display: none; }
  .metrics { gap: .4rem; }
  .metric { padding: .6rem .45rem; }
  .metric span { font-size: .8rem; }
  .insights-grid { grid-template-columns: 1fr; gap: 0; }
  .edit-fields { grid-template-columns: 1fr; }
  .chart-text { display: none; }
}
@media (max-width: 21rem) {
  .tiles--colecoes, .tiles--lojas { grid-template-columns: minmax(0, 1fr); }
  .admin-tabs button { padding-inline: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
