/* ============================================================
   PORTAL TEMPLO AYMORÉ — Design System
   Paleta derivada da logomarca + identidade do Instagram
   ============================================================ */

:root {
  /* Fundos */
  --cream:      #F4EEE0;
  --cream-2:    #FBF7EC;
  --surface:    #FFFFFF;

  /* Verdes (editorial / mata) */
  --green-900:  #22382B;
  --green-800:  #284233;
  --green-700:  #2E4A39;
  --green-600:  #3B5E47;
  --green-500:  #4A7359;

  /* Acentos da logomarca */
  --gold:       #C9A24A;
  --gold-dark:  #A8842F;
  --terracotta: #C5402E;
  --blue:       #3FA3CC;
  --brown:      #5C3A28;

  /* Texto */
  --ink:        #2A2A22;
  --muted:      #71715F;
  --line:       #E5DDC8;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 6px 22px rgba(34, 56, 43, .10);
  --shadow-sm:  0 2px 8px rgba(34, 56, 43, .08);
  --sidebar-w:  256px;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:  "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

/* SVGs sem dimensão explícita ficam pequenos por padrão */
svg { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.hint svg { width: 16px; height: 16px; }
.banner .b-tag svg { width: 14px; height: 14px; }
.li-mark svg { width: 20px; height: 20px; }
.card-head h3 svg { width: 18px; height: 18px; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); }

/* ---------- LAYOUT ---------- */
.app { display: flex; min-height: 100vh; }

.content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.page {
  padding: 26px 34px 60px;
  max-width: 1240px;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--green-800), var(--green-900));
  color: #E8EAE0;
  display: flex;
  flex-direction: column;
  padding: 22px 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand img {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--cream-2);
  padding: 3px;
  box-shadow: 0 0 0 2px var(--gold);
}
.brand .brand-txt b {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  display: block;
  line-height: 1.1;
  color: #fff;
}
.brand .brand-txt span {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.nav { padding: 14px 12px; flex: 1; }
.nav-label {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(232,234,224,.4);
  padding: 14px 12px 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #D6D9CC;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active {
  background: var(--green-600);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-foot {
  padding: 16px 20px 4px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(232,234,224,.55);
}
.sidebar-foot b { color: var(--gold); font-weight: 600; }

/* ---------- TOPBAR ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 34px;
  position: sticky; top: 0;
  z-index: 10;
}
.topbar .t-title { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.topbar .t-sub { font-size: 12.5px; color: var(--muted); }
.topbar .t-right { display: flex; align-items: center; gap: 14px; }
.t-date {
  font-size: 13px; color: var(--muted);
  text-align: right;
}
.t-user {
  display: flex; align-items: center; gap: 9px;
  padding-left: 14px; border-left: 1px solid var(--line);
}
.t-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.t-user b { font-size: 13.5px; display: block; line-height: 1.2; }
.t-user span { font-size: 11.5px; color: var(--muted); }

/* ---------- CARDS ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3 {
  font-family: var(--serif);
  font-size: 20px; font-weight: 600;
}
.card-head .link {
  font-size: 12.5px; color: var(--green-600); text-decoration: none; font-weight: 600;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-stats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
  .grid-2, .grid-3, .grid-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-stats { grid-template-columns: 1fr; }
}

/* ---------- STAT CARDS ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat .s-ico {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--cream); color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.stat .s-ico svg { width: 19px; height: 19px; }
.stat .s-num { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1; color: var(--green-800); }
.stat .s-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.stat.accent-green { border-top-color: var(--green-600); }
.stat.accent-blue  { border-top-color: var(--blue); }
.stat.accent-red   { border-top-color: var(--terracotta); }
.stat.accent-brown { border-top-color: var(--brown); }

/* ---------- BANNER (próxima gira) ---------- */
.banner {
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.banner::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  border: 14px solid rgba(201,162,74,.18);
}
.banner .b-tag {
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.banner h2 { font-family: var(--serif); font-size: 27px; font-weight: 600; margin: 3px 0; }
.banner p { color: rgba(255,255,255,.8); font-size: 14px; }
.banner .b-when {
  text-align: center; flex: none;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
}
.banner .b-when .d { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1; }
.banner .b-when .m { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.banner .b-when .h { font-size: 12.5px; margin-top: 4px; color: rgba(255,255,255,.85); }

/* ---------- LISTAS ---------- */
.list { list-style: none; }
.list li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: none; }
.li-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--cream); color: var(--green-700);
}
.li-mark .dd { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1; }
.li-mark .mm { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.li-body { flex: 1; min-width: 0; }
.li-body b { font-size: 14px; font-weight: 600; display: block; }
.li-body span { font-size: 12.5px; color: var(--muted); }

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge.green  { background: #E3EDE4; color: var(--green-700); }
.badge.gold   { background: #F4E9CC; color: var(--gold-dark); }
.badge.red    { background: #F6E0DC; color: var(--terracotta); }
.badge.blue   { background: #DCEEF5; color: #1F6F92; }
.badge.gray   { background: #EAE7DC; color: var(--muted); }

/* ---------- TABELA ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted);
  padding: 9px 10px; border-bottom: 2px solid var(--line);
}
.table td {
  padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--cream-2); }

/* ---------- BOTÕES ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: filter .15s, background .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-gold { background: var(--gold); color: #3a2e10; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--green-700); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-wpp { background: #25D366; color: #fff; }
.btn-wpp:hover { filter: brightness(1.05); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* ---------- FORMULÁRIOS ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--green-800);
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 14.5px;
  padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream-2); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500);
  background: #fff; box-shadow: 0 0 0 3px rgba(74,115,89,.12);
}

/* ---------- CHIPS (categorias) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--cream-2);
  color: var(--muted); cursor: pointer; user-select: none;
}
.chip.on { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- PRODUTO CARDS ---------- */
.prod {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.prod .p-top {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  padding: 22px; color: #fff; position: relative;
}
.prod .p-top .p-emoji { font-size: 34px; }
.prod .p-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.prod .p-body h4 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.prod .p-body p { font-size: 13px; color: var(--muted); margin: 6px 0 12px; flex: 1; }
.prod .p-foot { display: flex; align-items: center; justify-content: space-between; }
.prod .p-price { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--green-800); }

/* ---------- IDEIA / CANAL ---------- */
.idea {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 16px 18px; margin-bottom: 12px;
  border-left: 4px solid var(--gold);
}
.idea .i-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.idea .i-head b { font-size: 13.5px; }
.idea .i-meta { font-size: 12px; color: var(--muted); }
.idea .i-text { font-size: 14px; white-space: pre-wrap; }
.idea.status-nova { border-left-color: var(--terracotta); }
.idea.status-analise { border-left-color: var(--gold); }
.idea.status-respondida { border-left-color: var(--green-600); }

/* ---------- HELPERS ---------- */
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.sec-title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  margin: 26px 0 14px; display: flex; align-items: center; gap: 10px;
}
.sec-title::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--gold); }
.empty { text-align: center; color: var(--muted); padding: 26px; font-size: 14px; }
.hint {
  background: var(--cream-2); border: 1px dashed var(--gold);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; color: var(--brown);
}
.progress { height: 7px; background: var(--cream); border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green-600); }
