/* Painel administrativo — Academia Minueto */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #7BC043;
  --ink: #22282b;
  --muted: #67707a;
  --bg: #f2f4f2;
  --card: #ffffff;
  --line: #e3e7e3;
  --dark: #1F2528;
  --danger: #d4453a;
  --radius: 12px;
}

body { font-family: 'Inter', sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.brand-mark { font-family: 'Space Grotesk'; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-right: 5px; }
.brand-name { font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.3rem; color: var(--brand); }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--dark); }
.login-card {
  width: min(400px, 92vw); background: var(--card); border-radius: 18px; padding: 40px 36px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55);
}
.login-brand { margin-bottom: 20px; }
.login-card h1 { font-size: 1.45rem; margin-bottom: 4px; }
.login-sub { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.login-card form { display: grid; gap: 15px; }
.login-card label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.login-back { display: inline-block; margin-top: 20px; font-size: .85rem; color: var(--muted); }
.login-back:hover { color: var(--brand); }

/* Layout do app */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  background: var(--dark); color: rgba(255,255,255,.85); padding: 26px 16px;
  display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh;
}
.side-brand { padding: 0 10px; }
.side-brand .brand-mark { color: rgba(255,255,255,.45); }
.side nav { display: grid; gap: 4px; }
.side nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  font-size: .92rem; font-weight: 500; color: rgba(255,255,255,.72); transition: .15s;
}
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a.on { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }
.pill {
  margin-left: auto; font-style: normal; background: var(--brand); color: #10150d;
  font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 100px;
}
.side-foot { margin-top: auto; display: grid; gap: 6px; }
.side-foot a, .side-foot button {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; width: 100%;
  background: none; border: 0; border-radius: 9px; color: rgba(255,255,255,.6);
  font: inherit; font-size: .88rem; cursor: pointer; text-align: left;
}
.side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.07); color: #fff; }

.main { padding: 34px 40px 60px; max-width: 1080px; }
.head { margin-bottom: 24px; }
.head h1 { font-size: 1.7rem; margin-bottom: 4px; }
.head p { color: var(--muted); font-size: .94rem; }

/* Cartões e formulários */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.card h2 { font-size: 1.06rem; margin-bottom: 14px; }
.card h2:not(:first-child) { margin-top: 26px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { display: grid; gap: 2px; transition: .15s; }
.stat-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.stat-card svg { color: var(--brand); margin-bottom: 8px; }
.stat-card strong { font-family: 'Space Grotesk'; font-size: 1.7rem; }
.stat-card span { color: var(--muted); font-size: .85rem; }

.form { display: grid; gap: 15px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
input[type=text], input[type=password], input[type=email], input:not([type]), textarea, select {
  font: inherit; font-size: .93rem; padding: 10px 13px; border: 1.5px solid var(--line);
  border-radius: 9px; background: #fff; width: 100%; resize: vertical;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
input[type=file] { font-size: .88rem; padding: 9px; border: 1.5px dashed var(--line); border-radius: 9px; background: #fafbfa; width: 100%; }
input[type=color] { width: 52px; height: 38px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; cursor: pointer; }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row code { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Space Grotesk'; font-weight: 600; font-size: .92rem;
  background: var(--brand); color: #10150d; border: 1.5px solid transparent;
  padding: 11px 20px; border-radius: 9px; cursor: pointer; transition: .15s; width: fit-content;
}
.btn:hover { filter: brightness(1.07); }
.btn-sm { padding: 6px 13px; font-size: .82rem; }
.btn-ghost { background: none; border-color: var(--line); color: var(--ink); }
.btn-danger { background: none; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.alert { display: flex; align-items: center; gap: 10px; padding: 13px 17px; border-radius: 10px; margin-bottom: 18px; font-size: .92rem; font-weight: 500; }
.alert-ok { background: color-mix(in srgb, var(--brand) 16%, #fff); border: 1.5px solid var(--brand); }
.alert-ok svg { color: var(--brand); }
.alert-err { background: #fdecea; border: 1.5px solid var(--danger); color: var(--danger); }

/* Tabelas */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.unread td { background: color-mix(in srgb, var(--brand) 7%, #fff); }
td.clip { max-width: 320px; color: var(--muted); }
td.ic svg { color: var(--brand); }
small { color: var(--muted); }
.empty { color: var(--muted); font-size: .92rem; }

.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 100px; }
.tag-nova { background: #fff3cd; color: #8a6d1a; }
.tag-lida { background: #e2e8f0; color: #475569; }
.tag-respondida { background: color-mix(in srgb, var(--brand) 22%, #fff); color: #35631a; }
.tag-capa { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #10150d; }

/* Fotos */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-item { position: relative; display: grid; gap: 10px; padding: 14px; }
.photo-item img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; }
.photo-item .row input { flex: 1; }

/* Aparência */
.logo-preview { background: var(--dark); border-radius: 10px; padding: 20px; width: fit-content; margin-bottom: 6px; }
.logo-preview img { max-height: 64px; }
.hero-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick img { border-radius: 9px; aspect-ratio: 16/9; object-fit: cover; border: 3px solid transparent; transition: .15s; }
.pick input:checked + img { border-color: var(--brand); }
.pick-order {
  position: absolute; top: 8px; left: 8px; min-width: 24px; text-align: center;
  background: var(--brand); color: #10150d; font-family: 'Space Grotesk'; font-weight: 700;
  font-size: .74rem; padding: 2px 6px; border-radius: 100px;
}
.pick-order:empty { display: none; }
.replace-row input[type=file] { flex: 1; padding: 6px; font-size: .78rem; }

/* Calendário da agenda */
.cal { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 6px; }
.cal-day {
  display: grid; justify-items: center; gap: 2px; padding: 10px 2px 8px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; transition: .15s; text-align: center;
}
.cal-day:hover { border-color: var(--brand); transform: translateY(-2px); }
.cal-day.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, #fff); }
.cal-day.today .cal-num { text-decoration: underline; text-underline-offset: 3px; }
.cal-dow { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; color: var(--dim); letter-spacing: .06em; }
.cal-num { font-family: var(--disp); font-weight: 600; font-size: 1.05rem; line-height: 1.1; }
.cal-dot { font-family: var(--mono); font-size: .66rem; font-weight: 700; min-height: 15px; color: transparent; }
.cal-day.has .cal-dot {
  color: #10150d; background: var(--brand); border-radius: 99px; padding: 0 6px; min-width: 17px;
}
@media (max-width: 1000px) { .cal { grid-template-columns: repeat(7, 1fr); } }

/* Mensagens */
.crumb { font-size: .86rem; color: var(--muted); display: inline-block; margin-bottom: 14px; }
.crumb:hover { color: var(--brand); }
.msg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.msg-meta { color: var(--muted); font-size: .88rem; }
blockquote {
  background: var(--bg); border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 16px 18px; font-size: .95rem; margin-bottom: 18px;
}
.reply-done { background: color-mix(in srgb, var(--brand) 9%, #fff); border: 1.5px solid color-mix(in srgb, var(--brand) 40%, transparent); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
.reply-done h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 8px; color: #35631a; }
.reply-done p { font-size: .93rem; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side nav { display: flex; flex-wrap: wrap; }
  .side nav a span { display: none; }
  .side-foot { margin: 0 0 0 auto; display: flex; }
  .main { padding: 22px 18px 50px; }
  .cards, .photo-grid, .hero-pick { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
