/* Painel privado da Walérya */
body.admin { background: radial-gradient(ellipse at 20% 0%, #34321e, #14120e 60%) fixed; color: var(--cream); min-height: 100vh; }
.muted-light { color: rgba(248,243,234,.6); font-size: .9rem; }

.login { min-height: 100svh; display: grid; place-items: center; padding: 20px; position: relative; }
.login canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login__box { position: relative; width: min(400px, 100%); padding: 2.6rem 2rem; text-align: center; display: grid; gap: 14px; justify-items: center; animation: modalIn 1s cubic-bezier(.2,1.2,.3,1); }
.login__box h1 { margin: .4rem 0 0; font-size: 2.6rem; color: var(--gold-light); }
.login__box label { width: 100%; text-align: left; display: grid; gap: 6px; font-size: .74rem; letter-spacing: .1em; color: rgba(248,243,234,.8); }
.pass { position: relative; display: block; }
.pass input { width: 100%; padding: .9rem 3rem .9rem 1rem; border-radius: 12px; border: 1px solid rgba(234,215,168,.25); background: rgba(20,18,14,.55); color: var(--cream); font: inherit; }
.pass input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,164,100,.2); }
.pass button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--gold-light); padding: 8px; }
.login__box .btn { width: 100%; }
.login__box.shake { animation: shake .5s; }
@keyframes shake { 20%,60% { transform: translateX(-10px); } 40%,80% { transform: translateX(10px); } }
.back { color: rgba(248,243,234,.55); font-size: .8rem; text-decoration: none; }

.panel[hidden] { display: none; }
.panel__top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px clamp(14px, 3vw, 36px); background: rgba(14,13,10,.85); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(234,215,168,.12); }
.panel__brand { display: flex; align-items: center; gap: 12px; }
.panel__brand strong { font-size: 1.9rem; color: var(--gold-light); font-weight: 400; display: block; line-height: 1; }
.panel__brand small { font-size: .68rem; letter-spacing: .12em; color: rgba(248,243,234,.55); }
.panel__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel .btn--ghost { color: var(--cream); border-color: rgba(234,215,168,.4); }
.panel .btn--ghost:hover { background: var(--cream); color: var(--ink); }
.panel__main { width: min(1280px, 94%); margin: 28px auto 60px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi { padding: 1.2rem 1.4rem; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(234,215,168,.18); transform: perspective(700px) rotateX(0); transition: transform .4s; animation: kpiIn .8s both cubic-bezier(.2,1,.3,1); }
.kpi:hover { transform: perspective(700px) rotateX(8deg) translateY(-4px); }
.kpi strong { display: block; font-family: var(--f-serif); font-size: 2.6rem; font-weight: 500; color: var(--gold-light); line-height: 1.1; }
.kpi span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(248,243,234,.6); }
@keyframes kpiIn { from { opacity: 0; transform: perspective(700px) rotateX(-50deg) translateY(20px); } }

.panel__grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.panel__side { position: sticky; top: 90px; }
.cal--admin { padding: 1.2rem; border-radius: 20px; }
.cal--admin .cal__days button { position: relative; }
.cal--admin .cal__days button.has-ev::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
.cal--admin .cal__days button.has-ev.has-pend::after { background: #f0a090; }
.link-btn { margin-top: 10px; background: none; border: 0; color: var(--gold-light); font-size: .78rem; text-decoration: underline; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search], .toolbar select { padding: .75rem 1rem; border-radius: 12px; border: 1px solid rgba(234,215,168,.25); background: rgba(20,18,14,.55); color: var(--cream); font: inherit; font-size: .9rem; }
.toolbar input[type=search] { flex: 1 1 240px; }
.toolbar select option { color: var(--ink); }
.toolbar .chip span { font-size: .72rem; }

.list { display: grid; gap: 14px; }
.empty { text-align: center; padding: 3rem 1rem; color: rgba(248,243,234,.55); border: 1px dashed rgba(234,215,168,.25); border-radius: 18px; }
.item { border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(234,215,168,.16); overflow: hidden; animation: itemIn .6s both cubic-bezier(.2,1,.3,1); }
@keyframes itemIn { from { opacity: 0; transform: perspective(900px) rotateX(-25deg) translateY(16px); } }
.item__head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 1rem 1.2rem; cursor: pointer; }
.item__date { width: 64px; text-align: center; border-radius: 12px; background: var(--olive); padding: 6px 0; line-height: 1.1; }
.item__date b { display: block; font-family: var(--f-serif); font-size: 1.7rem; font-weight: 500; color: var(--gold-light); }
.item__date small { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.item__title { font-family: var(--f-serif); font-size: 1.35rem; color: var(--cream); }
.item__sub { font-size: .8rem; color: rgba(248,243,234,.6); }
.badge { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; padding: .45em .9em; border-radius: 999px; font-weight: 600; }
.badge--pendente { background: rgba(240,160,144,.18); color: #f3b3a5; }
.badge--confirmado { background: rgba(197,164,100,.22); color: var(--gold-light); }
.badge--realizado { background: rgba(130,170,120,.2); color: #b7d6a8; }
.badge--cancelado { background: rgba(255,255,255,.08); color: rgba(248,243,234,.45); }
.item__body { display: none; padding: 0 1.2rem 1.2rem; border-top: 1px solid rgba(234,215,168,.1); }
.item.is-open .item__body { display: block; animation: faqIn .4s; }
.item__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; margin: 1rem 0; }
.item__fields div { font-size: .88rem; }
.item__fields dt { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.item__fields dd { margin: 2px 0 0; word-break: break-word; }
.item__msg { grid-column: 1 / -1; }
.item__note { width: 100%; padding: .7rem .9rem; border-radius: 10px; border: 1px solid rgba(234,215,168,.2); background: rgba(20,18,14,.5); color: var(--cream); font: inherit; font-size: .88rem; resize: vertical; }
.item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.item__actions .btn { padding: .65em 1.2em; font-size: .68rem; }
.btn--wa { background: #25d366; color: #fff; }
.btn--danger { background: transparent; border-color: rgba(240,160,144,.5); color: #f3b3a5; }
.btn--danger:hover { background: #b9533f; color: #fff; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--gold-grad); color: var(--ink); padding: .8rem 1.4rem; border-radius: 999px; font-size: .85rem; font-weight: 500; transition: transform .5s cubic-bezier(.2,1.3,.3,1); z-index: 700; box-shadow: 0 20px 40px -20px #000; }
.toast.is-on { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .panel__grid { grid-template-columns: 1fr; }
  .panel__side { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .item__head { grid-template-columns: auto 1fr; }
  .item__head .badge { grid-column: 2; justify-self: start; }
  .panel__brand strong { font-size: 1.5rem; }
}
