/* W1 Office TV · painel administrativo */
:root {
  --petrol-900: #0b1e27; --petrol-800: #10303c; --petrol-700: #184252; --petrol-600: #2b5b6a;
  --ink: #0f2730; --muted: #5d7279; --line: #dbe3e5; --bg: #f3f6f7; --card: #fff;
  --mint: #86ddd0; --mint-soft: #e3f7f3; --danger: #b4423a;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.logo { background-color: currentColor; -webkit-mask: url(../img/w1-logo.png) no-repeat center / contain; mask: url(../img/w1-logo.png) no-repeat center / contain; }

/* login */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #133847, #0a1d26); }
.login-card { width: 360px; background: #fff; border-radius: 20px; padding: 40px 34px 34px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login-logo { width: 64px; height: 32px; color: var(--petrol-800); }
.login-card h1 { margin: 22px 0 4px; font-size: 26px; font-weight: 600; }
.login-card p { margin: 0 0 22px; }
.login-error { color: var(--danger); min-height: 20px; margin: 4px 0 12px !important; font-size: 14px; }

/* topo */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 0 28px; height: 68px; background: var(--petrol-900); color: #fff; }
.top-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; white-space: nowrap; }
.top-logo { width: 46px; height: 23px; color: #fff; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs button { background: none; border: 0; color: rgba(255,255,255,.65); padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.tabs button:hover { color: #fff; background: rgba(255,255,255,.06); }
.tabs button.on { color: var(--ink); background: var(--mint); }
.top-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.status { font-size: 13px; color: rgba(255,255,255,.7); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.status.dirty::before { background: #f2c14e; }
.status.err::before { background: #ff7a6e; }
.menu { position: absolute; right: 0; top: 52px; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.2); padding: 6px; min-width: 240px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: none; color: inherit; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }

.banner { background: #fff6dd; color: #6b5310; padding: 12px 28px; font-size: 14px; border-bottom: 1px solid #f0e2b4; }
.banner.err { background: #fde9e7; color: #7c2a23; border-color: #f4c9c4; }

/* botões */
.btn { border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--mint); color: var(--ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.18); }
.btn.line { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.btn.line:hover { border-color: var(--petrol-600); }
.btn.dark { background: var(--petrol-800); color: #fff; }
.btn.danger { background: none; color: var(--danger); border: 1px solid #ecc9c5; font-weight: 500; }
.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.wide { width: 100%; padding: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.1); color: inherit; cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn.light { background: var(--bg); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* layout */
.main { max-width: 1080px; margin: 0 auto; padding: 32px 28px 80px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 16px; }
.card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.card > p.muted { margin: 0 0 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: 1fr; } .top { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px; } .tabs { order: 3; flex-basis: 100%; } .status { display: none; } .main { padding: 20px 14px 60px; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea, .inp {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { border-color: var(--petrol-600); box-shadow: 0 0 0 3px rgba(43,91,106,.12); }
.field textarea { resize: vertical; min-height: 70px; }
.hint { font-size: 13px; color: var(--muted); }

/* interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 24px; background: #c9d4d7; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--petrol-600); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch span { font-size: 14px; }

/* lista de itens */
.row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.row.off { opacity: .6; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 16px; }
.row .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.order { display: flex; flex-direction: column; gap: 4px; }
.order .icon-btn { width: 28px; height: 22px; font-size: 12px; border-radius: 6px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--mint-soft); color: var(--petrol-700); }
.pill.grey { background: #edf0f1; color: var(--muted); }

.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--petrol-800); color: var(--mint); display: flex; align-items: center; justify-content: center; font-weight: 600; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 96px; height: 96px; font-size: 30px; }

.mini-bar { height: 6px; background: #e3eaec; border-radius: 6px; overflow: hidden; margin-top: 8px; max-width: 260px; }
.mini-bar b { display: block; height: 100%; background: var(--petrol-600); border-radius: 6px; }

/* editor */
.editor { border: 1px solid var(--petrol-600); box-shadow: 0 10px 30px rgba(16,48,60,.08); }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.photo-box { display: flex; align-items: center; gap: 16px; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ind-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ind-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ind-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ind-table td.num input { text-align: right; }
.ind-table .calc { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ind-table .calc b { color: var(--ink); }
@media (max-width: 760px) {
  .ind-table thead { display: none; }
  .ind-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ind-table td { border: 0; padding: 0; }
  .ind-table td:first-child { grid-column: 1 / -1; }
}

.editor-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); background: #fff; }

.podium { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.podium span { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 5px 10px; }
.podium span b { margin-right: 4px; }

/* prévia */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5,14,19,.78); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-box { width: min(1280px, 100%); background: var(--petrol-900); color: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,.5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; gap: 12px; }
.modal-head .muted { color: rgba(255,255,255,.6); font-size: 14px; margin-left: 8px; }
.screen { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--petrol-900); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 60; font-weight: 500; }

.ask-box { background: #fff; color: var(--ink); border-radius: 16px; padding: 26px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.ask-box p { margin: 0 0 22px; font-size: 16px; line-height: 1.45; }
.ask-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn.danger-solid { background: var(--danger); color: #fff; }
