/* Classes extras que não existem no painel.css pré-compilado (tokens do kit). */
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.bg-green-50 { background-color: #f0fdf4; }
.border-green-200 { border-color: #bbf7d0; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.users-pending { background-color: #fffbf5; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.focus-ring:focus { outline: none; box-shadow: 0 0 0 1px #d1d5dc; }
.wheel-row:hover { background-color: rgba(249,250,251,.8); }
.page-wide { max-width: 1320px; }
.mt-2 { margin-top: .5rem; }
.mb-2 { margin-bottom: .5rem; }

/* Toast do painel (app.js) */
.app-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: #003600; color: #fff; font-size: .8125rem; font-weight: 600; padding: .5rem 1rem; border-radius: .75rem; box-shadow: 0 10px 25px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.app-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Editor de roleta (tokens do kit: brand-dark #003600, brand-light #6dc07f, cinzas do Tailwind) ── */
.ed, .ed-modal { --ed-line: #f3f4f6; --ed-border: #e5e7eb; --ed-muted: #9ca3af; --ed-text: #374151; }
.ed-top { margin-bottom: 1rem; }
.ed-crumb { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; min-width: 0; }
.ed-crumb > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-link { color: inherit; }
.ed-link:hover { color: #4b5563; }
.ed-bar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.ed-name { flex: 1 1 260px; min-width: 0; }
.ed-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ed-status { font-size: .75rem; color: var(--ed-muted); }
.ed-status:empty { display: none; }
.ed-status.ok { color: #15803d; font-weight: 600; }
.ed-status.err { color: #dc2626; font-weight: 600; }
.ed-error { margin-top: .75rem; background: #fef2f2; border: 1px solid #fee2e2; color: #b91c1c; font-size: .75rem; padding: .75rem 1rem; border-radius: .75rem; }
.ed-error[hidden] { display: none; }

.ed-input { width: 100%; padding: .5rem .75rem; border: 1px solid var(--ed-border); border-radius: .5rem; font-size: .875rem; background: #fff; color: #111827; font-family: inherit; }
.ed-input:focus { outline: none; border-color: #15803d; box-shadow: 0 0 0 1px #15803d; }
.ed-input:disabled { background: #f9fafb; color: var(--ed-muted); }
.ed-input-lg { padding: .625rem .875rem; border-radius: .75rem; font-weight: 600; font-size: .9375rem; }
.ed-textarea { margin-top: .5rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }

.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; padding: .5rem .875rem; border: 1px solid var(--ed-border); background: #fff; color: var(--ed-text); border-radius: .5rem; font-size: .8125rem; font-weight: 600; cursor: pointer; transition: background-color .15s, opacity .15s; white-space: nowrap; font-family: inherit; }
.ed-btn:hover { background: #f9fafb; }
.ed-btn:disabled { opacity: .5; cursor: not-allowed; }
.ed-btn svg { width: 1rem; height: 1rem; }
.ed-btn-primary { background: #003600; border-color: #003600; color: #fff; }
.ed-btn-primary:hover { background: #0a4a0a; }
.ed-btn-sm { padding: .3125rem .625rem; font-size: .75rem; font-weight: 500; }
.ed-btn-danger { color: #dc2626; border-color: #fecaca; }
.ed-btn-danger:hover { background: #fef2f2; }
.ed-btn:focus-visible, .ed-tabs button:focus-visible, .ed-seg button:focus-visible, .ed-themes button:focus-visible { outline: 2px solid #6dc07f; outline-offset: 2px; }

.ed-grid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.ed-panel { order: 1; background: #fff; border: 1px solid var(--ed-line); border-radius: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 170px); min-height: 420px; }
.ed-preview-col { order: 2; position: sticky; top: 1rem; min-width: 0; }
.ed-preview .stage { width: 100%; }
@media (max-width: 899px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-preview-col { order: 0; position: static; }
  .ed-panel { max-height: none; min-height: 0; }
  .ed-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 480px) {
  .ed-btn span { display: none; }
  .ed-actions .ed-btn-primary { flex: 1; }
  .ed-hint { display: none; }
}

.ed-tabs { display: flex; border-bottom: 1px solid var(--ed-line); flex: none; }
.ed-tabs button { flex: 1; border: 0; background: none; padding: .875rem .375rem; font-weight: 600; font-size: .875rem; color: var(--ed-muted); border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.ed-tabs button:hover { color: #4b5563; }
.ed-tabs button.on { color: #003600; border-bottom-color: #003600; }
.ed-count { background: #f3f4f6; color: #6b7280; border-radius: 999px; padding: 1px 7px; font-size: .6875rem; margin-left: .25rem; }
.ed-tabs button.on .ed-count { background: rgba(109,192,127,.25); color: #003600; }
.ed-tab { padding: 1rem; overflow: auto; flex: 1; min-height: 0; }
.ed-tab[hidden] { display: none; }

.ed-row { display: flex; gap: .375rem; flex-wrap: wrap; }
.ed-entries { list-style: none; margin: .75rem 0; padding: 0; display: flex; flex-direction: column; gap: .375rem; }
.ed-entries li { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border: 1px solid var(--ed-line); border-radius: .625rem; background: #f9fafb; }
.ed-entries li:focus-within { border-color: #6dc07f; background: #fff; }
.ed-num { color: var(--ed-muted); font-size: .75rem; width: 1.5rem; text-align: right; flex: none; }
.ed-sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ed-ename { flex: 1; min-width: 0; border: 0; background: transparent; padding: .375rem .25rem; font-size: .875rem; outline: none; font-family: inherit; color: #111827; }
.ed-chance { border: 1px solid var(--ed-border); border-radius: .375rem; background: #fff; font-size: .75rem; padding: .1875rem; color: var(--ed-text); font-family: inherit; }
.ed-pct { font-size: .6875rem; color: var(--ed-muted); width: 2.75rem; text-align: right; flex: none; }
.ed-pct.is-fixed { color: #003600; font-weight: 600; }
.ed-x { border: 0; background: none; color: var(--ed-muted); font-size: 1.125rem; line-height: 1; padding: 0 .25rem; cursor: pointer; }
.ed-x:hover { color: #dc2626; }
.ed-empty { font-size: .8125rem; color: var(--ed-muted); text-align: center; padding: 1rem 0; }
.ed-empty[hidden] { display: none; }
.ed-add { display: flex; gap: .5rem; }
.ed-details { margin-top: 1rem; border-top: 1px solid var(--ed-line); padding-top: .75rem; }
.ed-details summary { cursor: pointer; font-size: .8125rem; font-weight: 600; color: var(--ed-text); }
.ed-details code { background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }

.ed-toggle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .625rem 0; border-bottom: 1px solid var(--ed-line); font-size: .875rem; color: var(--ed-text); }
.ed-toggle label { flex: 1; cursor: pointer; }
.ed-switch { flex: none; width: 40px; height: 22px; appearance: none; -webkit-appearance: none; background: #d1d5db; border-radius: 20px; position: relative; cursor: pointer; transition: .2s; margin: 0; }
.ed-switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.ed-switch:checked { background: #003600; }
.ed-switch:checked::after { left: 20px; }
.ed-switch:focus-visible { outline: 2px solid #6dc07f; outline-offset: 2px; }
.ed-sub { padding: .5rem 0 .25rem; }
.ed-field { margin-top: 1rem; }
.ed-label { display: block; font-size: .75rem; font-weight: 500; color: #6b7280; margin-bottom: .375rem; }
.ed-seg { display: flex; border: 1px solid var(--ed-border); border-radius: .625rem; overflow: hidden; }
.ed-seg button { flex: 1; border: 0; background: #fff; padding: .5rem; font-weight: 600; font-size: .8125rem; color: var(--ed-text); cursor: pointer; font-family: inherit; }
.ed-seg button + button { border-left: 1px solid var(--ed-border); }
.ed-seg button.on { background: #003600; color: #fff; }

.ed-h { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ed-muted); margin: 1.25rem 0 .5rem; }
.ed-tab > .ed-h:first-child { margin-top: 0; }
.ed-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ed-themes button { border: 2px solid var(--ed-line); border-radius: .625rem; padding: .375rem; background: #fff; font-size: .75rem; font-weight: 600; color: var(--ed-text); cursor: pointer; font-family: inherit; }
.ed-themes button:hover { border-color: var(--ed-border); }
.ed-themes button.on { border-color: #003600; }
.ed-grad { height: 16px; border-radius: 5px; margin-bottom: 4px; }
.ed-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.ed-up { border: 1px dashed #d1d5db; border-radius: .75rem; padding: .625rem; text-align: center; background: #f9fafb; }
.ed-up b { display: block; font-size: .8125rem; margin-bottom: .375rem; color: var(--ed-text); }
.ed-up .ed-row { justify-content: center; }
.ed-thumb { height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; border-radius: .5rem; overflow: hidden; background: #fff; color: var(--ed-muted); font-size: .75rem; }
.ed-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ed-cover img { width: 100%; height: 100%; object-fit: cover; }
.ed-file { position: relative; overflow: hidden; }
.ed-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ed-upmsg { font-size: .75rem; color: #6b7280; margin-top: .5rem; }
.ed-upmsg[hidden] { display: none; }
.ed-upmsg.err { color: #dc2626; }
.ed-colors { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.ed-colors label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid var(--ed-line); border-radius: .625rem; padding: .375rem .625rem; font-size: .8125rem; color: var(--ed-text); cursor: pointer; background: #fff; }
.ed-colors input[type=color] { width: 32px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.ed-colors .ed-check { justify-content: flex-start; }
.ed-check input { accent-color: #003600; }
.ed-inline { display: inline-flex; align-items: center; gap: .375rem; }
.ed-auto { font-size: .6875rem; font-weight: 700; color: #003600; }
.ed-auto[hidden] { display: none; }
.ed-range { width: 100%; accent-color: #003600; }

.ed-modal { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 70; }
.ed-modal[hidden] { display: none; }
.ed-modal-card { width: 100%; max-width: 480px; background: #fff; border-radius: 1rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); padding: 1.25rem; }
.ed-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.ed-share { display: flex; gap: .5rem; }
.ed-share .ed-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }
.ed-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
.ed p[hidden], .ed-modal p[hidden] { display: none; }
@media (max-width: 700px) { .ed-preview .stage { height: min(95vw, 420px); } }
