:root {
  --panel-ink: #2a172f;
  --panel-plum: #35143b;
  --panel-plum-light: #4a2452;
  --panel-gold: #bf9650;
  --panel-gold-light: #e8c982;
  --panel-paper: #fffaf2;
  --panel-cream: #f4ecdf;
  --panel-muted: #746a76;
  --panel-line: rgba(54, 31, 60, .14);
}

* { box-sizing: border-box; }
body.painel-body { min-height: 100vh; margin: 0; color: var(--panel-ink); background: var(--panel-cream); font-family: 'DM Sans', Arial, sans-serif; }
.painel-header { display: flex; align-items: center; gap: 28px; min-height: 78px; padding: 12px max(24px, calc((100vw - 1380px) / 2)); color: #fff7e8; background: var(--panel-plum); }
.painel-brand { display: inline-flex; align-items: center; min-width: 190px; }
.painel-brand img { display: block; width: 178px; height: auto; }
.painel-header__nav { display: flex; gap: 24px; margin-left: auto; }
.painel-header__nav a { color: inherit; text-decoration: none; font-size: .88rem; font-weight: 600; }
.painel-header__nav a:hover { color: var(--panel-gold-light); }
.painel-logout { padding: 10px 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: inherit; background: transparent; cursor: pointer; }
.painel-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 90px; }
.painel-hero { max-width: 840px; margin-bottom: 38px; }
.painel-eyebrow { margin: 0 0 10px; color: #956e38; font-size: .72rem; font-weight: 800; letter-spacing: .17em; }
.painel-hero h1 { margin: 0; color: var(--panel-ink); font: 600 clamp(2.2rem, 5vw, 4rem)/1.08 'Playfair Display', Georgia, serif; }
.painel-hero > p:last-child { max-width: 760px; margin: 18px 0 0; color: var(--panel-muted); font-size: 1.06rem; line-height: 1.7; }
.painel-login { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 24px; max-width: 780px; padding: 32px; border: 1px solid var(--panel-line); border-radius: 22px; background: var(--panel-paper); box-shadow: 0 18px 48px rgba(44, 22, 47, .08); }
.painel-login__mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 50%; color: var(--panel-gold-light); background: var(--panel-plum); font-size: 2rem; }
.painel-login h2, .painel-section-heading h2, .painel-welcome h2 { margin: 0; color: var(--panel-ink); font: 600 clamp(1.6rem, 3vw, 2.35rem)/1.2 'Playfair Display', Georgia, serif; }
.painel-login p:not(.painel-eyebrow) { max-width: 620px; color: var(--panel-muted); line-height: 1.65; }
.painel-primary, .painel-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; font: 700 .92rem 'DM Sans', Arial, sans-serif; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.painel-primary { border: 1px solid var(--panel-plum); color: #fff9ef; background: var(--panel-plum); box-shadow: 0 8px 22px rgba(53,20,59,.15); }
.painel-primary:hover { transform: translateY(-1px); background: #49214e; }
.painel-secondary { border: 1px solid var(--panel-line); color: var(--panel-ink); background: #fffdf9; }
.painel-secondary:hover { transform: translateY(-1px); background: #f7efdf; }
.painel-welcome { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.painel-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; align-items: start; }
.painel-sidebar { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 5px; padding: 18px; border-radius: 18px; color: #fff8ed; background: var(--panel-plum); }
.painel-side-link { display: block; padding: 13px 14px; border: 0; border-radius: 11px; color: inherit; background: transparent; font: 600 .93rem 'DM Sans', Arial, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.painel-side-link:hover, .painel-side-link.is-active { color: var(--panel-ink); background: #f7eddc; }
.painel-sidebar__note { margin: 14px 6px 4px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,248,237,.78); font-size: .79rem; line-height: 1.6; }
.painel-main { min-width: 0; }
.painel-list-section, .painel-editor { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--panel-line); border-radius: 20px; background: var(--panel-paper); box-shadow: 0 14px 38px rgba(44, 22, 47, .06); }
.painel-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.painel-count { color: var(--panel-muted); font-size: .88rem; }
.painel-listing-list { display: grid; gap: 12px; }
.painel-listing-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--panel-line); border-radius: 14px; background: #fffdf9; }
.painel-listing-card h3 { margin: 0 0 5px; font-size: 1.08rem; }
.painel-listing-card p { margin: 0; color: var(--panel-muted); font-size: .88rem; line-height: 1.5; }
.painel-listing-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.painel-status { padding: 5px 10px; border-radius: 999px; color: #55405d; background: #f0e9f1; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.painel-status--published { color: #275d42; background: #e2f1e7; }
.painel-status--paused { color: #835b17; background: #f7edcf; }
.painel-listing-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.painel-listing-actions button { min-height: 36px; padding: 0 12px; border: 1px solid var(--panel-line); border-radius: 999px; color: var(--panel-ink); background: white; font-weight: 700; cursor: pointer; }
.painel-listing-actions button:hover { background: #f4ecdf; }
.painel-empty { padding: 40px 22px; border: 1px dashed rgba(53,20,59,.27); border-radius: 16px; text-align: center; }
.painel-empty > span { color: var(--panel-gold); font-size: 2rem; }
.painel-empty h3 { margin: 10px 0 7px; font: 600 1.5rem 'Playfair Display', Georgia, serif; }
.painel-empty p { max-width: 460px; margin: 0 auto 18px; color: var(--panel-muted); line-height: 1.6; }
.painel-form-intro { margin: 0 0 22px; color: var(--panel-muted); line-height: 1.6; }
.painel-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.painel-field { display: grid; gap: 8px; color: var(--panel-ink); font-size: .88rem; font-weight: 700; }
.painel-field--wide { grid-column: 1 / -1; }
.painel-field input:not([type=checkbox]), .painel-field textarea, .painel-field select { width: 100%; min-height: 46px; padding: 12px 14px; border: 1px solid rgba(53,20,59,.2); border-radius: 11px; outline: none; color: var(--panel-ink); background: #fff; font: 400 .95rem 'DM Sans', Arial, sans-serif; }
.painel-field textarea { min-height: 100px; resize: vertical; }
.painel-field input:focus, .painel-field textarea:focus, .painel-field select:focus { border-color: var(--panel-gold); box-shadow: 0 0 0 3px rgba(191,150,80,.15); }
.painel-field input:disabled { color: #8c8490; background: #f2eee9; }
.painel-field__hint { color: var(--panel-muted); font-size: .78rem; font-weight: 400; line-height: 1.5; }
.painel-form-grid fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.painel-form-grid legend { margin-bottom: 8px; font-size: .88rem; font-weight: 700; }
.painel-check-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.painel-check-row label { display: inline-flex; align-items: center; gap: 7px; color: var(--panel-muted); font-size: .9rem; font-weight: 500; }
.painel-check-row input, .painel-checkbox input, .painel-confirm input { accent-color: var(--panel-plum); }
.painel-checkbox { grid-template-columns: auto 1fr; align-items: center; }
.painel-policy-note { margin: 19px 0 4px; padding: 14px 16px; border-left: 3px solid var(--panel-gold); border-radius: 0 10px 10px 0; color: #5e5261; background: #f6efdf; font-size: .86rem; line-height: 1.6; }
.listing-kind-fields { margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--panel-line); }
.listing-kind-fields h3 { margin: 0 0 18px; font: 600 1.45rem 'Playfair Display', Georgia, serif; }
.painel-confirm { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; color: #5d5261; font-size: .85rem; line-height: 1.55; }
.painel-confirm input { flex: 0 0 auto; margin-top: 3px; }
.painel-form-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; margin-top: 15px; }
.painel-back { padding: 8px 0; border: 0; color: #6b526f; background: transparent; font-weight: 700; cursor: pointer; }
.painel-message { min-height: 1.2em; margin: 8px 0; color: #6c2b35; font-size: .88rem; }
.painel-message.is-success { color: #2d6847; }
.painel-toast { position: fixed; z-index: 10; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 48px)); padding: 13px 17px; border-radius: 12px; color: #fff8ed; background: var(--panel-plum); box-shadow: 0 15px 40px rgba(35,17,37,.25); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.painel-toast.is-visible { opacity: 1; transform: translateY(0); }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .painel-header { min-height: 68px; padding: 10px 20px; }
  .painel-brand { min-width: 130px; }
  .painel-brand img { width: 142px; }
  .painel-header__nav { gap: 12px; }
  .painel-header__nav a { font-size: .79rem; }
  .painel-shell { width: min(100% - 32px, 700px); padding-top: 36px; }
  .painel-layout { grid-template-columns: 1fr; }
  .painel-sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .painel-sidebar__note { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .painel-header { gap: 10px; flex-wrap: wrap; }
  .painel-header__nav { order: 3; width: 100%; justify-content: space-between; padding: 4px 0 2px; }
  .painel-brand img { width: 130px; }
  .painel-shell { width: calc(100% - 24px); padding: 28px 0 56px; }
  .painel-login { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
  .painel-welcome, .painel-section-heading { align-items: flex-start; flex-direction: column; }
  .painel-form-grid { grid-template-columns: 1fr; }
  .painel-field, .painel-field--wide { grid-column: 1; }
  .painel-listing-card { grid-template-columns: 1fr; }
  .painel-listing-actions { justify-content: start; }
  .painel-form-actions { justify-content: stretch; }
  .painel-form-actions > button { flex: 1 1 auto; }
  .painel-list-section, .painel-editor { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.space-claims-section { margin-top: 22px; }
.space-claims-list { display: grid; gap: 12px; }
.space-claim-card { padding: 18px; border: 1px solid var(--panel-line); border-radius: 14px; background: #fffdf9; }
.space-claim-card h3 { margin: 0 0 7px; font-size: 1.05rem; }
.space-claim-card p { margin: 6px 0; color: var(--panel-muted); font-size: .88rem; line-height: 1.55; }
.space-claim-card__notice { padding: 11px 13px; border-left: 3px solid var(--panel-gold); border-radius: 0 9px 9px 0; color: #5d4c62 !important; background: #f6efdf; }
.space-claim-card__reply { display: grid; gap: 9px; margin-top: 14px; }
.space-claim-card__reply label { display: grid; gap: 8px; font-size: .86rem; font-weight: 700; }
.space-claim-card__reply textarea { width: 100%; min-height: 78px; padding: 11px 13px; border: 1px solid var(--panel-line); border-radius: 10px; color: var(--panel-ink); background: white; font: 400 .92rem 'DM Sans', Arial, sans-serif; }
.space-claim-card__reply button { justify-self: start; }
.space-claim-card__withdraw { margin-top: 12px; padding: 8px 0; border: 0; color: #6b526f; background: transparent; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .space-claim-card { padding: 14px; } }

.request-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-status--under_review { color: #3c506e; background: #e6edf8; }
.request-status--waiting_info { color: #825c12; background: #f8ebc6; }
.request-status--conflict { color: #7c3140; background: #f8e0e2; }
.request-status--applied { color: #286144; background: #e0f0e5; }
.request-status--rejected { color: #7b3c44; background: #f4e3e4; }
.request-proposal { margin-top: 15px; padding: 14px; border: 1px solid var(--panel-line); border-radius: 12px; background: #fbf5ea; }
.request-proposal h4 { margin: 0 0 10px; font-size: .86rem; }
.request-proposal > p { margin: 0; }
.request-diff { display: grid; gap: 9px; margin: 0; }
.request-diff__row { display: grid; grid-template-columns: minmax(110px, .55fr) minmax(0, 1fr) minmax(0, 1fr); gap: 9px; align-items: start; }
.request-diff dt { grid-column: 1 / -1; color: var(--panel-muted); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.request-diff dd { min-width: 0; margin: 0; padding: 8px 9px; border-radius: 8px; overflow-wrap: anywhere; font-size: .8rem; line-height: 1.45; }
.request-diff__before { color: #625966; background: #eee9e4; }
.request-diff__before::before { content: 'Original'; display: block; margin-bottom: 3px; color: #877e86; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.request-diff__after { color: #3d2943; background: #f8e8c7; }
.request-diff__after::before { content: 'Proposto'; display: block; margin-bottom: 3px; color: #80602b; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.request-messages { margin-top: 13px; }
.request-messages summary { color: #634267; font-size: .84rem; font-weight: 700; cursor: pointer; }
.request-message-list { display: grid; gap: 8px; margin-top: 10px; }
.request-message-list p { padding: 9px 11px; border-left: 3px solid var(--panel-gold); border-radius: 0 8px 8px 0; background: #f8f1e4; }
.legacy-claims { margin-top: 22px; padding: 17px 20px; border: 1px solid var(--panel-line); border-radius: 15px; color: var(--panel-ink); background: rgba(255, 250, 242, .72); }
.legacy-claims > summary { color: #634267; font-weight: 700; cursor: pointer; }
.legacy-claims > p { color: var(--panel-muted); font-size: .86rem; line-height: 1.5; }
.space-claim-card--legacy { opacity: .86; }
.painel-admin-section { margin-top: 22px; }
.painel-listing-actions a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--panel-line); border-radius: 999px; color: var(--panel-ink); background: white; font-size: .82rem; font-weight: 700; text-decoration: none; }
.painel-listing-actions a:hover { background: #f4ecdf; }
.painel-field textarea#listing-details { min-height: 185px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; }
@media (max-width: 560px) {
  .request-card__heading { flex-direction: column; }
  .request-diff__row { grid-template-columns: 1fr; gap: 5px; }
  .request-diff dt { grid-column: auto; }
  .legacy-claims { padding: 15px; }
}
