/* Painel administrativo — Ateliê de Música */
:root {
  --ink: #0f1353; --ink-2: #1a2070; --gold: #f2b61c; --gold-soft: #fff4d6; --gold-deep: #b98300;
  --bg: #f5f3ee; --panel: #ffffff; --text: #1d2044; --muted: #6b6f8f; --line: #e8e5dc; --line-2: #f0ede5;
  --danger: #d6344a; --danger-soft: #fdecef; --ok: #16a36a; --ok-soft: #e6f7ef; --info-soft: #eef0ff;
  --radius: 16px; --shadow: 0 1px 2px rgba(15,19,83,.04), 0 8px 24px -12px rgba(15,19,83,.12);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Fraunces", Georgia, serif;
  --side: 264px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h2 { font-size: 19px; }
h2 svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.content svg:not([width]) { max-width: 40px; max-height: 40px; }
.muted { color: var(--muted); }
.only-mobile { display: none !important; }
[hidden] { display: none !important; }
svg { flex: none; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--ink); color: #d7d9f5; display: flex; flex-direction: column; z-index: 50; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand img { width: 44px; }
.side-brand strong { display: block; font-family: var(--display); font-size: 17px; font-weight: 600; }
.side-brand small { color: var(--gold); font-size: 12px; font-weight: 600; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.side-group { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); padding: 18px 12px 8px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: rgba(255,255,255,.75); transition: background .2s, color .2s; }
.side-nav a svg { width: 19px; height: 19px; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: var(--gold); color: var(--ink); }
.side-nav a.active svg { opacity: 1; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11.5px; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; animation: pulse 2s infinite; }
.side-nav a.active .nav-badge { background: var(--ink); color: var(--gold); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(214,52,74,.25); } }
.side-foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: rgba(255,255,255,.7); font-weight: 600; }
.side-foot a:hover { color: var(--gold); }
.side-foot svg { width: 18px; height: 18px; }
.side-overlay { display: none; }

.main { flex: 1; margin-left: var(--side); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(245,243,238,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-title { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.content { padding: 28px; max-width: 1400px; width: 100%; }

.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; color: var(--text); text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 3px var(--bg); }
.icon-btn.ring svg { animation: ring 1s ease; }
@keyframes ring { 10%,30%,50% { transform: rotate(14deg); } 20%,40% { transform: rotate(-14deg); } 60% { transform: none; } }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-weight: 800; }
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 15px; }
.avatar-lg { width: 84px; height: 84px; font-size: 32px; position: relative; }
.avatar-lg img { position: absolute; inset: 0; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit > div { flex: 1; min-width: 0; display: grid; gap: 6px; }
.user-cell { display: inline-flex; align-items: center; gap: 12px; }
.user-meta { text-align: left; line-height: 1.15; }
.user-meta strong { display: block; font-size: 13.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: 12px; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px -15px rgba(15,19,83,.3); padding: 6px; display: none; z-index: 60; }
.dropdown.open .dropdown-menu { display: block; animation: dd .2s ease; }
@keyframes dd { from { opacity: 0; transform: translateY(-6px); } }
.dropdown-menu > a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.dropdown-menu > a:hover { background: var(--bg); }
.dropdown-menu svg { width: 18px; height: 18px; }
.notif-menu { width: min(360px, calc(100vw - 30px)); padding: 0; overflow: hidden; }
.dd-head { padding: 14px 16px; font-weight: 800; border-bottom: 1px solid var(--line); }
.dd-body { max-height: 360px; overflow-y: auto; }
.dd-item { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.dd-item:hover { background: var(--gold-soft); }
.dd-item .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--gold); color: var(--ink); display: grid; place-items: center; flex: none; }
.dd-item .ic svg { width: 18px; height: 18px; }
.dd-item strong { display: block; font-size: 14px; }
.dd-item small { color: var(--muted); font-size: 12.5px; }
.dd-foot { display: block; text-align: center; padding: 12px; font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--ink); background: var(--bg); }
.dd-foot:hover { background: var(--line); }

/* Componentes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { box-shadow: 0 6px 16px -6px rgba(242,182,28,.8); transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { box-shadow: 0 6px 16px -6px rgba(15,19,83,.6); }
.btn-light { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn-light:hover { border-color: var(--ink); box-shadow: none; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: none; }
.btn-wa { background: #25d366; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel + .panel { margin-top: 20px; }

.page-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-actions .left { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; transition: opacity .4s; }
.alert svg { width: 20px; height: 20px; }
.alert-success { background: var(--ok-soft); color: #0b6b45; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--ink); }

/* Tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbf8; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fcfbf7; }
.table tr.is-new { background: #fff9e8; }
.table .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table a.row-link { text-decoration: none; font-weight: 700; }
.table a.row-link:hover { color: var(--gold-deep); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted); }
.pill.on { background: var(--ok-soft); color: var(--ok); }
.pill.gold { background: var(--gold-soft); color: var(--gold-deep); }

/* Cards de resumo */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stats > .panel, .grid-2 > .panel, .grid-2-eq > .panel { margin-top: 0; }
.stat { padding: 20px; display: flex; gap: 14px; align-items: center; text-decoration: none; transition: transform .2s; }
a.stat:hover { transform: translateY(-2px); }
.stat .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); flex: none; }
.stat .ic svg { width: 24px; height: 24px; }
.stat.hot .ic { background: var(--danger-soft); color: var(--danger); }
.stat b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; font-weight: 600; }
.stat span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.welcome { background: var(--ink); color: #fff; border-radius: 20px; padding: 28px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; position: relative; }
.welcome::after { content: "♫"; position: absolute; right: 30px; top: -40px; font-size: 200px; opacity: .06; }
.welcome h2 { font-family: var(--display); font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.welcome p { margin: 0; color: rgba(255,255,255,.7); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2.grid-side { grid-template-columns: 300px 1fr; }
.grid-2 > *, .grid-2-eq > *, .form-grid > * { min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

/* Formulários */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 700; font-size: 13.5px; }
.field small, .hint { color: var(--muted); font-size: 12.5px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=datetime-local], .field input[type=search], .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,19,83,.08); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.input-prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.input-prefix span { padding: 0 12px; color: var(--muted); font-weight: 700; background: var(--bg); align-self: stretch; display: grid; place-items: center; }
.input-prefix input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.input-prefix:focus-within { border-color: var(--ink); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; margin-bottom: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d6d3ca; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.form-error { color: var(--danger); font-size: 13px; font-weight: 600; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(245,243,238,.92); backdrop-filter: blur(8px); padding: 14px 0; margin-top: 10px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); z-index: 5; }
.search-inline { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px 3px 3px 12px; }
.search-inline input { border: 0; outline: none; background: transparent; padding: 7px 0; min-width: 180px; }
.search-inline select { border: 0; background: var(--bg); border-radius: 9px; padding: 7px 10px; }

/* Upload / imagens */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; background: #fcfbf8; }
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: var(--gold-soft); }
.dropzone svg { width: 32px; height: 32px; color: var(--gold-deep); margin: 0 auto 8px; }
.dropzone input { display: none; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); border: 2px solid transparent; cursor: grab; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.img-tile .tile-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.img-tile .tile-actions button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255,255,255,.95); cursor: pointer; display: grid; place-items: center; color: var(--danger); }
.img-tile .tile-actions svg { width: 15px; height: 15px; }
.img-tile .cover-tag { position: absolute; left: 6px; bottom: 6px; background: var(--ink); color: var(--gold); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; display: none; }
.img-grid .img-tile:first-child .cover-tag { display: block; }
.img-tile.removed { opacity: .35; border-color: var(--danger); }
.img-tile.dragging { opacity: .5; }
.img-tile.over { border-color: var(--gold); }
.img-tile.new::after { content: "novo"; position: absolute; left: 6px; top: 6px; background: var(--gold); color: var(--ink); font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }

/* Opções de produto */
.opt-row { display: grid; grid-template-columns: 160px 1fr 42px; gap: 10px; margin-bottom: 10px; align-items: start; }
.opt-row .input { margin: 0; }
.opt-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.opt-preview span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; background: var(--bg); }

/* Matriz de permissões */
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table td:first-child strong { display: block; }
.perm-table td:first-child small { color: var(--muted); }
.perm-check { width: 22px; height: 22px; accent-color: var(--ink); cursor: pointer; }
.role-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.role-list a:hover { background: #fcfbf7; }
.role-list a.active { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.role-list strong { display: block; }
.role-list small { color: var(--muted); }

/* Pedido */
.order-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 22px; }
.order-hero .code { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: .02em; }
.task-list { list-style: none; margin: 0; padding: 0; counter-reset: task; }
.task-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.task-list li:last-child { border: 0; }
.task-list li::before { counter-increment: task; content: counter(task); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-weight: 800; flex: none; font-size: 13px; }
.task-list li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.task-list li.done > div > strong { text-decoration: line-through; color: var(--muted); }
.pick-item { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.pick-item:last-child { border: 0; }
.pick-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bg); }
.pick-item.picked { background: var(--ok-soft); }
.pick-item.picked .pname { text-decoration: line-through; color: var(--muted); }
.pick-item input { width: 24px; height: 24px; accent-color: var(--ok); cursor: pointer; }
.pick-item .opts { font-size: 13px; color: var(--muted); }
.pick-item .opts b { color: var(--text); background: var(--gold-soft); padding: 1px 7px; border-radius: 6px; font-weight: 700; }
.qty-big { font-family: var(--display); font-size: 22px; font-weight: 600; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--line); margin-left: 6px; }
.history li:last-child { border-color: transparent; padding-bottom: 0; }
.history li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 0 3px #fff; }
.history small { color: var(--muted); display: block; }
.contact-card { display: grid; gap: 10px; }
.contact-card .line { display: flex; align-items: center; gap: 10px; }
.contact-card svg { width: 18px; height: 18px; color: var(--muted); }

/* Estados vazios */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-ic { width: 70px; height: 70px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; margin: 0 auto 16px; }
.empty-state .empty-ic svg { width: 32px; height: 32px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; padding: 16px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 20px 50px -10px rgba(15,19,83,.5); animation: tin .4s cubic-bezier(.2,.8,.2,1); text-decoration: none; }
.toast .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--gold); color: var(--ink); display: grid; place-items: center; flex: none; }
.toast .ic svg { width: 20px; height: 20px; }
.toast small { color: rgba(255,255,255,.7); display: block; }
@keyframes tin { from { opacity: 0; transform: translateY(20px); } }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); }
.login-art { background: radial-gradient(700px 500px at 80% 10%, #2a33a8, transparent 60%), var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; position: relative; overflow: hidden; }
.login-art img { width: min(360px, 80%); }
.login-art h2 { font-family: var(--display); font-size: 36px; font-weight: 500; max-width: 420px; }
.login-art p { color: rgba(255,255,255,.65); }
.login-art .notes { position: absolute; right: -40px; bottom: -60px; font-size: 360px; opacity: .05; line-height: 1; }
.login-box { display: grid; place-items: center; padding: 30px 20px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h1 { font-family: var(--display); font-weight: 600; font-size: 34px; margin-bottom: 6px; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; }
.pw-wrap button svg { width: 18px; height: 18px; }

/* Responsivo */
@media (max-width: 1200px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  body.side-open .sidebar { transform: none; }
  body.side-open .side-overlay { display: block; position: fixed; inset: 0; background: rgba(6,8,40,.5); z-index: 45; }
  .main { margin-left: 0; }
  .only-mobile { display: grid !important; }
  .grid-2, .grid-2-eq, .grid-2.grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { padding: 30px 24px; min-height: 0; }
  .login-art h2, .login-art p.big { display: none; }
  .login-art img { width: 200px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .top-title { font-size: 20px; }
  .user-meta { display: none; }
  .user-btn { padding: 4px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat b { font-size: 24px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .opt-row { grid-template-columns: 1fr 42px; }
  .opt-row > :nth-child(2) { grid-column: 1 / 2; }
  .opt-row > :nth-child(3) { grid-row: 1; grid-column: 2; }
  .pick-item { grid-template-columns: auto 48px 1fr; padding: 12px 16px; }
  .pick-item img { width: 48px; height: 48px; }
  .pick-item .qty-big { grid-column: 3; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .search-inline { width: 100%; }
  .search-inline input { min-width: 0; flex: 1; }
  .page-actions > * { width: 100%; }
  .page-actions .btn { width: 100%; }
  /* tabelas viram cartões */
  table.table.cards { min-width: 0; }
  .table.cards thead { display: none; }
  .table.cards tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.cards td { padding: 0; border: 0; }
  .table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; font-weight: 600; }
  .table.cards td.c-thumb { grid-row: span 4; }
  .table.cards td.c-main { font-size: 15px; }
  .table.cards td.actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 8px; }
  .table.cards td:not(.c-thumb) { grid-column: 2; }
  .table.cards td.actions { grid-column: 1 / -1; }
}

/* Escola: vínculos e anexos */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.check-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; background: #fff; transition: border-color .2s, background .2s; }
.check-card:has(input:checked) { border-color: var(--ink); background: var(--gold-soft); }
.check-card input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf8; flex-wrap: wrap; }
.file-list img, .file-ic { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.file-ic { display: grid; place-items: center; background: #fdecef; color: var(--danger); font-size: 11px; font-weight: 800; }
.file-list a { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-list .rm { font-size: 13px; color: var(--danger); display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* Crédito de desenvolvimento */
.credit { margin: 10px 12px 2px; font-size: 11.5px; line-height: 1.6; color: rgba(255,255,255,.45); }
.credit a { display: inline !important; padding: 0 !important; color: rgba(255,255,255,.7) !important; font-weight: 700; text-decoration: none; }
.credit a:hover { color: var(--gold) !important; }
.credit-login { text-align: center; margin-top: 28px; color: var(--muted); }
.credit-login a { color: var(--ink) !important; }
.credit-login a:hover { color: var(--gold-deep) !important; }

.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; margin-bottom: 8px; font-weight: 400; }
.radio-card:has(input:checked) { border-color: var(--ink); background: var(--gold-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--ink); flex: none; }
.radio-card strong { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.radio-card strong svg { width: 16px; height: 16px; }
.radio-card small { display: block; color: var(--muted); font-size: 12.5px; }
