/* Bravella · panel de administración */
body.admin { background: var(--blush-50); min-height: 100vh; }
.demo-banner { background: #fff1d6; color: #6b5020; padding: 10px 20px; font-size: .88rem; text-align: center; position: sticky; top: 0; z-index: 50; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { background: var(--paper); border-radius: 28px; box-shadow: var(--shadow-md); padding: 40px 34px; width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.auth-card img { margin: 0 auto; border-radius: 50%; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card form { text-align: left; }
.auth-card code { background: var(--blush-100); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

.panel { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--paper); border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.side-brand img { border-radius: 50%; }
.side-brand span { font-family: var(--f-display); font-size: 1.4rem; line-height: 1.1; display: flex; flex-direction: column; }
.side-brand small { font-family: var(--f-body); font-size: .72rem; color: var(--rosegold); letter-spacing: .06em; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav button { text-align: left; border: 0; background: none; padding: 11px 14px; border-radius: 10px; cursor: pointer; font-size: .95rem; color: var(--ink-soft); transition: background .2s; }
.side-nav button:hover { background: var(--blush-50); }
.side-nav button.is-active { background: var(--blush-100); color: var(--ink); font-weight: 500; }

.content { padding: 0 clamp(16px, 4vw, 48px) 80px; min-width: 0; }
.savebar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; background: var(--blush-50); border-bottom: 1px solid var(--line); margin-bottom: 28px; font-size: .9rem; color: var(--ink-mute); }
.savebar.is-dirty { color: var(--rosegold-deep); font-weight: 500; }
.tab h2 { font-size: 2.6rem; margin-bottom: 8px; }
.tab > .muted { margin-top: 0; }
.card { background: var(--paper); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.card h3 { font-size: 1.6rem; margin-bottom: 16px; }
.card.narrow { max-width: 460px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; align-items: end; }
.grid-form .span-2 { grid-column: span 2; }
.grid-form > .btn { margin-bottom: 12px; }
.toolbar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .field { min-width: 200px; }
.field-label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); margin: 8px 0 8px; }
.hint { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink-mute); font-size: .78rem; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.checks label { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--blush-200); border-radius: 999px; cursor: pointer; font-size: .9rem; }
.checks input { accent-color: var(--rosegold-deep); }
.switch { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.switch input { margin-top: 4px; accent-color: var(--rosegold-deep); width: 18px; height: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-flex; align-items: center; gap: 8px; background: var(--blush-100); border-radius: 999px; padding: 6px 8px 6px 14px; font-size: .88rem; }
.tag button { border: 0; background: rgba(255, 255, 255, .7); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.inline-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-add input { font: inherit; padding: 10px 12px; border: 1px solid var(--blush-200); border-radius: 10px; background: var(--bg); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 18px; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.item-head h3 { margin: 0; font-size: 1.5rem; }
.item-actions { display: flex; gap: 6px; }
.icon-btn { border: 1px solid var(--blush-200); background: var(--paper); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: .95rem; line-height: 1; }
.icon-btn:hover { background: var(--blush-50); }
.icon-btn.danger:hover { background: #fbe4e6; border-color: #e3a9b1; }
.img-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 4px; }
.img-thumb { width: 120px; height: 120px; border-radius: 14px; background: var(--blush-100); overflow: hidden; display: grid; place-items: center; color: var(--ink-mute); font-size: .78rem; text-align: center; flex: none; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-field[data-img-kind="qr"] .img-thumb img { object-fit: contain; background: #fff; }
.img-btns { display: flex; flex-direction: column; gap: 8px; }
.img-btns label { cursor: pointer; }
.img-btns input[type=file] { display: none; }

details.proc-item { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
details.proc-item > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
details.proc-item > summary::-webkit-details-marker { display: none; }
.proc-item .mini { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--blush-100); flex: none; }
.proc-item .sum-name { font-family: var(--f-display); font-size: 1.35rem; flex: 1; }
.proc-item .sum-cat { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rosegold); }
.proc-item .proc-edit { padding: 4px 18px 20px; }
.resp-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.resp-checks label { display: flex; align-items: center; gap: 6px; font-size: .9rem; padding: 6px 12px; border: 1px solid var(--blush-200); border-radius: 999px; cursor: pointer; }

.res-list { display: flex; flex-direction: column; gap: 18px; }
.res-day h4 { font-family: var(--f-display); font-size: 1.4rem; font-weight: 500; margin: 0 0 8px; text-transform: capitalize; }
.res-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); font-size: .9rem; }
.res-table th, .res-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.res-table th { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; background: var(--blush-50); }
.res-table tr:last-child td { border-bottom: 0; }
.res-table .block td { color: var(--ink-mute); font-style: italic; }
.res-empty { background: var(--paper); border-radius: 14px; padding: 30px; text-align: center; color: var(--ink-mute); }

@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; gap: 14px; padding: 16px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-nav button { white-space: nowrap; flex: none; }
  .grid-form .span-2 { grid-column: auto; }
  .res-table { display: block; overflow-x: auto; }
}
