/* Painel de controle — II ACACICON SUMMIT */
:root {
  --navy: #071233; --navy-2: #0d1d4f; --gold: #e3b04b; --gold-d: #b9862a;
  --bg: #f3f5fa; --card: #fff; --ink: #0f1a3d; --muted: #63709a; --line: #e1e6f2;
  --ok: #12805c; --err: #c4283a;
  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 400 15px/1.55 var(--f-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, legend { font-family: var(--f-display); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
.ic { flex: none; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 2px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: 600 14px/1.2 var(--f-body); cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); box-shadow: 0 8px 18px -10px var(--navy); transform: translateY(-1px); }
.btn--soft { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--soft:hover { border-color: var(--gold-d); }
.btn--danger { background: #fff; border-color: #f1c9ce; color: var(--err); }
.btn--danger:hover { background: var(--err); color: #fff; border-color: var(--err); }
.btn--xs { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; padding: 13px; }

/* Estrutura */
.side { position: fixed; inset: 0 auto 0 0; width: 264px; background: linear-gradient(180deg, var(--navy), #040a1f); color: #cfd8f3; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side__brand img { height: 38px; width: auto; }
.side__brand b { display: block; font: 800 13.500px/1.2 var(--f-display); color: #fff; letter-spacing: .03em; }
.side__brand small { font-size: 12px; color: var(--gold); }
.side__nav { padding: 14px 12px 28px; display: grid; gap: 2px; }
.side__nav p { margin: 18px 10px 6px; font: 700 10.500px/1 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: #6f7fb0; }
.side__nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.side__nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side__nav a.is-on { background: linear-gradient(135deg, #f3d68c, var(--gold) 50%, var(--gold-d)); color: #1c1300; font-weight: 600; }
.side__veil { display: none; }
.main { margin-left: 264px; min-height: 100vh; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 14px 28px; background: rgba(243, 245, 250, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 20px; font-weight: 800; margin-right: auto; }
.bar__menu { display: none; width: 40px; height: 40px; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.content { padding: 26px 28px 80px; max-width: 1080px; }
.lead { color: var(--muted); margin-bottom: 18px; }
.crumb { margin-bottom: 14px; font-weight: 600; color: var(--muted); }
.crumb a:hover { color: var(--ink); }

/* Alertas */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert--ok { background: #e8f6f0; border-color: #b9e2d1; color: var(--ok); }
.alert--err { background: #fdecee; border-color: #f4c4ca; color: var(--err); }

/* Cartões e início */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin: 0 0 18px; min-width: 0; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
fieldset.card legend { float: left; width: 100%; font-size: 16px; font-weight: 700; padding: 0 0 16px; }
fieldset.card legend + * { clear: both; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: 18px; margin-bottom: 18px; color: #fff; background: radial-gradient(600px 300px at 90% 0, rgba(47, 125, 246, .45), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.hello h2 { font-size: 24px; font-weight: 800; }
.hello p { margin-top: 6px; color: #c5cfee; max-width: 60ch; }
.hello .btn--primary { background: linear-gradient(135deg, #f3d68c, var(--gold) 50%, var(--gold-d)); color: #1c1300; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: grid; gap: 2px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 26px -18px rgba(7, 18, 51, .5); }
.tile__ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--gold); margin-bottom: 8px; }
.tile b { font: 800 26px/1.1 var(--f-display); }
.tile span:last-child { color: var(--muted); font-size: 13.500px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.todo { display: grid; gap: 10px; }
.todo li { display: flex; align-items: baseline; gap: 10px; }
.todo li > span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; translate: 0 -1px; }
.todo a { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--gold-d); white-space: nowrap; }
.quick { display: grid; gap: 4px; }
.quick a { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; transition: background .2s; }
.quick a:hover { background: var(--bg); }
.quick .ic { margin-top: 2px; color: var(--gold-d); }
.quick b { display: block; font-weight: 600; }
.quick small { color: var(--muted); }

/* Formulários */
.form--narrow { max-width: 720px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field--wide, .field--bool { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13.500px; }
.field label em { color: var(--err); font-style: normal; }
input[type=text], input[type=password], input[type=datetime-local], input:not([type]), textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid #cfd6e8; background: #fff; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold-d); box-shadow: 0 0 0 3px rgba(227, 176, 75, .28); }
.help { color: var(--muted); font-size: 12.500px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 44px; height: 26px; border-radius: 999px; background: #cbd3e6; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold-d); outline-offset: 2px; }
.img { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img__prev { width: 132px; height: 96px; border-radius: 12px; display: grid; place-items: center; padding: 8px; overflow: hidden;
  background: repeating-conic-gradient(#0d1a45 0 25%, #132257 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.img__prev img { max-width: 100%; max-height: 80px; object-fit: contain; }
.img__prev--empty { background: var(--bg); color: var(--muted); font-size: 12px; gap: 2px; align-content: center; justify-items: center; }
.img__ctl { display: grid; gap: 8px; flex: 1; min-width: 220px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500 !important; color: var(--err); cursor: pointer; }
.color { display: flex; align-items: center; gap: 12px; }
.color input { width: 56px; height: 42px; padding: 3px; border-radius: 10px; border: 1px solid #cfd6e8; background: #fff; cursor: pointer; }
.color code { font-size: 13px; color: var(--muted); }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; background: linear-gradient(180deg, transparent, var(--bg) 40%); }

/* Listas */
.listhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.listhead .lead { margin: 0; }
.rows { display: grid; gap: 8px; }
.rowi { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.rowi:hover { border-color: #c9d2e8; }
.rowi.is-off { opacity: .62; }
.rowi__move { display: grid; gap: 2px; }
.rowi__move button { width: 26px; height: 20px; border: 0; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 9px; cursor: pointer; }
.rowi__move button:hover:not(:disabled) { background: var(--navy); color: #fff; }
.rowi__move button:disabled { opacity: .35; cursor: default; }
.rowi__thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--navy); color: var(--gold); font: 700 15px/1 var(--f-display); }
.rowi__thumb img { width: 100%; height: 100%; object-fit: contain; }
.rowi__main { flex: 1; min-width: 0; }
.rowi__main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi__main small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi__main:hover b { color: var(--gold-d); }
.rowi__act { display: flex; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 48px 24px; color: var(--muted); text-align: center; }

/* Login / primeiro acesso */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(700px 420px at 80% 0, rgba(47, 125, 246, .35), transparent 70%), radial-gradient(600px 400px at 0 100%, rgba(227, 176, 75, .18), transparent 70%), var(--navy); }
.auth__card { width: min(420px, 100%); padding: 36px 32px 28px; border-radius: 22px; background: #fff; box-shadow: 0 40px 90px -30px #000; display: grid; gap: 6px; }
.auth__logo { height: 64px; width: auto; margin: 0 auto 6px; padding: 8px 14px; border-radius: 14px; background: var(--navy); }
.auth__card h1 { font-size: 20px; font-weight: 800; text-align: center; }
.auth__sub { text-align: center; color: var(--muted); margin-bottom: 14px; }
.auth form { display: grid; gap: 14px; }
.auth__back { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13.500px; }
.auth__back:hover { color: var(--ink); }

/* Responsivo */
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .25s; }
  .menu-toggle:checked ~ .side { transform: none; }
  .menu-toggle:checked ~ .side__veil { display: block; position: fixed; inset: 0; background: rgba(4, 10, 31, .55); z-index: 30; }
  .main { margin-left: 0; }
  .bar { padding: 12px 16px; }
  .bar__menu { display: grid; }
  .bar h1 { font-size: 17px; }
  .bar .btn span { display: none; }
  .content { padding: 18px 16px 80px; }
  .grid, .cols { grid-template-columns: 1fr; }
  .rowi { flex-wrap: wrap; }
  .rowi__act { width: 100%; justify-content: flex-end; }
}

/* Usuários e permissões */
.tag--gold { background: linear-gradient(135deg, #f3d68c, var(--gold) 50%, var(--gold-d)); color: #1c1300; }
.perm__title { font: 700 11px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.perm { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; transition: border-color .2s, background .2s; }
.perm label:hover { border-color: var(--gold-d); }
.perm label:has(input:checked) { background: #fdf6e3; border-color: var(--gold); }
.perm input { width: 17px; height: 17px; accent-color: var(--navy); }
.perm__admin { display: none; padding: 14px 16px; border-radius: 12px; background: var(--bg); color: var(--muted); font-weight: 500; clear: both; }
#permsBox.is-admin > :not(legend):not(.perm__admin) { display: none; }
#permsBox.is-admin .perm__admin { display: block; }
#permsBox .lead .btn { margin-left: 6px; }
