/* =========================================================
   AligierreTech3D · Agenda de Produção
   Dark premium · azul-marinho, azul elétrico, ciano, prata
   ========================================================= */
:root {
  --bg: #04080e;
  --bg-2: #070d17;
  --surface: #0b1422;
  --surface-2: #0f1a2c;
  --surface-3: #142238;
  --line: rgba(90, 170, 220, .14);
  --line-2: rgba(90, 190, 235, .28);
  --line-3: rgba(80, 200, 240, .55);
  --text: #e9f0f7;
  --text-2: #b8c6d6;
  --muted: #7d8ea4;
  --faint: #4d5d73;
  --blue: #2f7df6;
  --blue-2: #1f5fd0;
  --cyan: #3cc8e6;
  --steel: #4f93b8;
  --silver: #cfd8e1;
  --silver-2: #8fa0b0;
  --ok: #4ade80;
  --warn: #f5b84a;
  --danger: #f2707a;
  --grad: linear-gradient(135deg, #2f7df6 0%, #3cc8e6 100%);
  --grad-soft: linear-gradient(135deg, rgba(47,125,246,.16), rgba(60,200,230,.08));
  --metal: linear-gradient(180deg, #f2f6fa 0%, #b9c6d2 45%, #7f909f 100%);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .02) inset;
  --glow: 0 0 0 1px rgba(60, 200, 230, .35), 0 8px 30px rgba(47, 125, 246, .25);
  --f-title: 'Sora', 'Space Grotesk', system-ui, sans-serif;
  --f-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(47,125,246,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(60,200,230,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--f-title); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
a { color: var(--cyan); text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metal { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(60,200,230,.35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: #1d2c44 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1a2840; border-radius: 10px; border: 2px solid var(--bg); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; transform: scale(.96); } }

/* ---------- ícones ---------- */
.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-lg { width: 22px; height: 22px; }

/* ---------- botões & campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-3); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #031220; box-shadow: 0 6px 24px rgba(47,125,246,.35); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 8px 30px rgba(60,200,230,.45); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.btn-danger { color: var(--danger); border-color: rgba(242,112,122,.3); background: transparent; }
.btn-danger:hover { background: rgba(242,112,122,.08); border-color: rgba(242,112,122,.6); }
.btn-wa { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.35); color: #7ff0a9; }
.btn-wa:hover { background: rgba(74,222,128,.14); border-color: rgba(74,222,128,.6); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; text-transform: uppercase; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px;
  background: rgba(4, 9, 16, .7); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 10px;
  font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8ea4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(60,200,230,.15); }
input[type=date].input::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(1) hue-rotate(160deg); cursor: pointer; }
.input-xl { height: 56px; font-size: 20px; font-family: var(--f-title); letter-spacing: .06em; text-align: center; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; color: var(--text-2); }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(4,9,16,.7); display: grid; place-items: center; margin: 0; cursor: pointer; }
.check input:checked { background: var(--grad); border-color: transparent; }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #031220; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(17, 29, 48, .72), rgba(10, 18, 31, .72));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.card-h h3 { font-size: 16px; }
.card-b { padding: 18px 22px 22px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }

/* ---------- LOGIN ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-hero {
  position: relative; overflow: hidden;
  padding: 56px clamp(28px, 6vw, 88px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 420px at 30% 40%, rgba(47,125,246,.16), transparent 65%),
    linear-gradient(180deg, #050b15 0%, #04080e 100%);
}
.layers { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: repeating-linear-gradient(0deg, rgba(80,190,235,.05) 0 1px, transparent 1px 7px);
  mask-image: radial-gradient(600px 400px at 40% 45%, #000 20%, transparent 75%); }
.brand { display: flex; align-items: center; gap: 12px; position: relative; }
.brand img { width: 36px; height: auto; }
.brand b { font-family: var(--f-title); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand b em { font-style: normal; color: var(--cyan); }
.hero-body { position: relative; max-width: 620px; }
.hero-logo { position: relative; width: clamp(130px, 16vw, 190px); margin-bottom: 36px; filter: drop-shadow(0 18px 40px rgba(47,125,246,.35)); }
.hero-logo img { width: 100%; animation: printUp 2.2s cubic-bezier(.6,.05,.3,1) both; }
.hero-logo .nozzle { position: absolute; left: -12%; right: -12%; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 14px var(--cyan); animation: nozzle 2.2s cubic-bezier(.6,.05,.3,1) both; }
@keyframes printUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes nozzle { from { bottom: 0; opacity: 1; } 92% { opacity: 1; } to { bottom: 100%; opacity: 0; } }
.hero-body h1 { font-size: clamp(34px, 4.4vw, 58px); font-weight: 700; letter-spacing: -.035em; }
.hero-body p { font-size: 17px; color: var(--text-2); max-width: 520px; margin: 22px 0 0; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(10,20,34,.6); font-size: 13px; color: var(--text-2); }
.tag .i { width: 15px; height: 15px; color: var(--cyan); }
.hero-foot { position: relative; font-size: 13px; color: var(--faint); }

.login-side { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 410px; padding: 36px 32px; }
.login-card h2 { font-size: 26px; margin-top: 10px; }
.login-card .sub { color: var(--muted); margin: 8px 0 28px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4,9,16,.5); margin-bottom: 4px; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.linkbtn { background: none; border: 0; color: var(--cyan); cursor: pointer; font-size: 13px; padding: 0; margin-left: auto; }
.form-err { color: var(--danger); font-size: 13.5px; min-height: 0; }
.steps { display: flex; gap: 6px; margin-top: 26px; justify-content: center; }
.steps i { width: 22px; height: 3px; border-radius: 3px; background: var(--surface-3); }
.steps i.on { background: var(--grad); }

/* ---------- SHELL ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7,13,23,.92), rgba(4,8,14,.92));
  backdrop-filter: blur(8px);
}
.side .brand { padding: 4px 8px 22px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14.5px;
  border: 1px solid transparent; position: relative;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.025); }
.nav a.on { color: var(--text); background: var(--grad-soft); border-color: var(--line-2); }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 12px var(--cyan); }
.nav a.on .i { color: var(--cyan); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 700; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(245,184,74,.12); color: var(--warn); display: grid; place-items: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10,18,31,.6); }
.me b { font-size: 13.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }
.me > div:not(.avatar):not(.me-acts) { min-width: 0; flex: 1; }
.me .me-acts { flex-basis: 100%; display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.me .me-acts .btn { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-title); font-weight: 700; font-size: 14px; color: #031220; background: var(--metal); flex: none; }
.avatar.alt { background: var(--grad); }

.main { min-width: 0; padding: 28px clamp(18px, 3.2vw, 44px) 64px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.top h1 { font-size: clamp(24px, 2.6vw, 32px); }
.top p { margin: 6px 0 0; color: var(--muted); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.mobile-bar { display: none; }

/* ---------- PAINEL ---------- */
.hero-strip {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  padding: 30px 32px; margin-bottom: 22px;
  border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background:
    radial-gradient(500px 220px at 90% 30%, rgba(60,200,230,.16), transparent 70%),
    linear-gradient(120deg, #0b1730 0%, #0a1322 55%, #08101c 100%);
}
.hero-strip .layers { opacity: .7; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero-strip h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; position: relative; }
.hero-strip p { color: var(--text-2); margin: 8px 0 0; position: relative; max-width: 560px; }
.hero-strip img { width: 96px; position: relative; filter: drop-shadow(0 10px 30px rgba(47,125,246,.4)); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; cursor: default; }
.kpi .lbl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .lbl .i { color: var(--steel); width: 16px; height: 16px; }
.kpi .val { font-family: var(--f-title); font-size: 34px; font-weight: 700; margin-top: 10px; letter-spacing: -.03em; }
.kpi .foot { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.alert { border-color: rgba(245,184,74,.35); }
.kpi.alert .val { color: var(--warn); }
.kpi.focus { border-color: var(--line-2); box-shadow: var(--glow); }
.kpi.focus .val { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid-2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.tl-item:hover { background: rgba(255,255,255,.025); border-color: var(--line); }
.tl-date { text-align: center; border-radius: 10px; border: 1px solid var(--line); padding: 6px 0; background: rgba(4,9,16,.5); }
.tl-date b { display: block; font-family: var(--f-title); font-size: 20px; line-height: 1.1; }
.tl-date small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tl-date.late { border-color: rgba(245,184,74,.45); }
.tl-date.late b { color: var(--warn); }
.tl-date.today { border-color: var(--line-3); box-shadow: var(--glow); }
.tl-date.today b { color: var(--cyan); }
.tl-main { min-width: 0; }
.tl-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-main small { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.when.late { color: var(--warn); }

.pipe { display: flex; flex-direction: column; gap: 12px; }
.pipe-row { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.pipe-bar { height: 8px; background: rgba(255,255,255,.04); border-radius: 99px; overflow: hidden; }
.pipe-bar i { display: block; height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.pipe-row b { text-align: right; font-family: var(--f-title); font-size: 14px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gal { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: var(--surface); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gal:hover img { transform: scale(1.05); }
.gal span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; font-weight: 600; background: linear-gradient(transparent, rgba(3,8,14,.92)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; font-size: 13.5px; color: var(--text-2); }
.feed-item::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--steel); box-shadow: 0 0 0 4px rgba(79,147,184,.12); }
.feed-item small { display: block; color: var(--faint); font-size: 12px; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .i { width: 34px; height: 34px; color: var(--faint); margin: 0 auto 10px; stroke-width: 1.3; }
.empty b { display: block; color: var(--text-2); font-family: var(--f-title); font-weight: 600; margin-bottom: 4px; }

/* ---------- status / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.s-imprimindo::before { animation: blink 1.6s ease-in-out infinite; box-shadow: 0 0 8px currentColor; }
@keyframes blink { 50% { opacity: .25; } }
.s-orcamento  { --c: #9aa9bb; }
.s-fila       { --c: #6f9be0; }
.s-modelagem  { --c: #8fa8ff; }
.s-imprimindo { --c: #3cc8e6; }
.s-acabamento { --c: #5fd6c9; }
.s-pronto     { --c: #4ade80; }
.s-entregue   { --c: #8796a8; }
.s-cancelado  { --c: #e0727c; }
.badge[class*="s-"] { color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
.prio { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.prio-alta { color: var(--warn); }
.prio-urgente { color: var(--danger); }
.prio-baixa { color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 3px 9px; border-radius: 8px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.pill .i { width: 13px; height: 13px; color: var(--steel); }
.pill.paid { color: var(--ok); border-color: rgba(74,222,128,.25); }

/* ---------- CALENDÁRIO ---------- */
.cal-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-head h2 { font-size: 21px; text-transform: capitalize; min-width: 180px; }
.cal-head .sp { flex: 1; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow div { padding: 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(118px, auto); }
.day { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background .15s; position: relative; }
.day:nth-child(7n+1) { border-left: 0; }
.day:hover { background: rgba(60,200,230,.03); }
.day.out { background: rgba(0,0,0,.18); }
.day.out .dn { color: var(--faint); }
.day.wk .dn { color: var(--muted); }
.day.sel { background: rgba(47,125,246,.07); box-shadow: inset 0 0 0 1px var(--line-3); }
.dn { font-family: var(--f-title); font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--text-2); }
.day.today .dn { background: var(--grad); color: #031220; box-shadow: 0 0 16px rgba(60,200,230,.45); }
.ev {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: color-mix(in srgb, var(--c) 12%, transparent); border-left: 2px solid var(--c);
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.ev:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.ev.start { background: transparent; border-left-style: dashed; color: var(--muted); }
.ev.late { border-left-color: var(--warn); }
.ev em { font-style: normal; color: var(--muted); font-size: 11px; flex: none; }
.ev span { overflow: hidden; text-overflow: ellipsis; }
.more { font-size: 11.5px; color: var(--cyan); padding-left: 4px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

.day-panel { position: sticky; top: 24px; }

.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4,9,16,.45); cursor: pointer; transition: border-color .15s; }
.mini:hover { border-color: var(--line-3); }
.thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--steel); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini small { display: block; color: var(--muted); font-size: 12.5px; margin: 1px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini > div { min-width: 0; }

/* ---------- PROJETOS ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; height: 42px; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { border-radius: var(--r-lg); border: 1px solid var(--line); background: rgba(7,13,23,.55); display: flex; flex-direction: column; min-height: 200px; transition: border-color .15s, background .15s; }
.col.drop { border-color: var(--line-3); background: rgba(47,125,246,.06); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.col-h b { font-family: var(--f-title); font-size: 14px; font-weight: 600; }
.col-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.col-h small { margin-left: auto; color: var(--muted); font-size: 12px; }
.col-b { padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 80px; }

.pcard { border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, #0f1a2c, #0b1422); overflow: hidden; cursor: grab; transition: border-color .15s, transform .15s, box-shadow .2s; }
.pcard:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.4); }
.pcard.dragging { opacity: .4; }
.pcard .cover { aspect-ratio: 16/9; background: var(--surface-3); overflow: hidden; }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pb { padding: 12px 14px 14px; }
.pcard h4 { font-size: 14.5px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.pcard h4 .qty { margin-left: auto; font-family: var(--f-title); color: var(--cyan); font-size: 13px; flex: none; }
.pcard .cl { color: var(--muted); font-size: 13px; margin: 3px 0 10px; display: flex; align-items: center; gap: 6px; }
.pcard .cl .i { width: 14px; height: 14px; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.list { overflow: hidden; }
.list table { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; transition: background .12s; }
.list tbody tr:hover { background: rgba(60,200,230,.03); }
.list .prod { display: flex; gap: 12px; align-items: center; min-width: 220px; }
.list .prod .thumb { width: 44px; height: 44px; }
.list .prod b { display: block; font-weight: 600; }
.list .prod small { color: var(--muted); font-size: 12.5px; }
.num { font-family: var(--f-title); font-weight: 600; }

/* ---------- MODAL / DRAWER ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(2,5,10,.66); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 5vh 16px; overflow-y: auto; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 860px; border-radius: 20px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #0e192b, #09111e); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(60,200,230,.06); animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.modal.sm { max-width: 460px; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 20px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 24px 26px; }
.modal-f { display: flex; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.modal-f .sp { flex: 1; }
.sec { margin-bottom: 26px; }
.sec:last-child { margin-bottom: 0; }
.sec-t { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-family: var(--f-title); font-size: 14px; font-weight: 600; color: var(--silver); }
.sec-t .i { color: var(--cyan); width: 17px; height: 17px; }
.sec-t::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.fg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; }

.status-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pick label { cursor: pointer; }
.status-pick input { position: absolute; opacity: 0; pointer-events: none; }
.status-pick .badge { height: 32px; padding: 0 13px; font-size: 12.5px; opacity: .55; transition: opacity .15s, box-shadow .15s; }
.status-pick input:checked + .badge { opacity: 1; box-shadow: 0 0 0 1px var(--c), 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); }
.status-pick input:focus-visible + .badge { outline: 2px solid var(--cyan); outline-offset: 2px; }

.drop-zone { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; font-size: 14px; }
.drop-zone:hover, .drop-zone.over { border-color: var(--cyan); background: rgba(60,200,230,.04); color: var(--text-2); }
.drop-zone .i { width: 28px; height: 28px; color: var(--cyan); margin: 0 auto 8px; stroke-width: 1.4; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 14px; }
.tb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.tb img { width: 100%; height: 100%; object-fit: cover; }
.tb.capa { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.tb .acts { position: absolute; inset: auto 4px 4px 4px; display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.tb:hover .acts, .tb:focus-within .acts { opacity: 1; }
.tb .acts button { width: 26px; height: 26px; border-radius: 7px; border: 0; background: rgba(3,8,14,.85); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.tb .acts button .i { width: 14px; height: 14px; }
.tb .flag { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--grad); color: #031220; }
.tb.novo::after { content: 'novo'; position: absolute; right: 4px; top: 4px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(3,8,14,.85); color: var(--cyan); }

/* arquivos */
.arqs { display: flex; flex-direction: column; gap: 8px; }
.arq { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4,9,16,.45); }
.arq-ic { width: 40px; height: 40px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--cyan); }
.arq-ic b { font-family: var(--f-title); font-size: 10.5px; letter-spacing: .04em; }
.arq-n { min-width: 0; flex: 1; }
.arq-n b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arq-n small { color: var(--muted); font-size: 12px; }
label.btn { cursor: pointer; }

/* detalhe */
.detail { display: grid; grid-template-columns: 1.05fr 1fr; }
.detail-media { background: #050a12; border-right: 1px solid var(--line); border-radius: 20px 0 0 20px; overflow: hidden; display: flex; flex-direction: column; }
.detail-media .big { flex: 1; min-height: 420px; position: relative; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #0f1d33, #050a12 70%); }
.detail-media .big img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .big .ph { color: var(--faint); text-align: center; font-size: 13px; }
.detail-media .big .ph img { width: 90px; height: auto; opacity: .25; margin: 0 auto 10px; object-fit: contain; }
.detail-media .strip { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.detail-media .strip button { width: 58px; height: 58px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .6; }
.detail-media .strip button.on { opacity: 1; border-color: var(--cyan); }
.detail-media .strip img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-info h2 { font-size: 24px; }
.detail-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kv div small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.kv div b { font-weight: 500; color: var(--text); word-break: break-word; }
.client-box { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(4,9,16,.5); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.client-box > div:not(.avatar) { flex: 1; min-width: 140px; }
.client-box b { display: block; }
.client-box small { color: var(--muted); }
.desc { white-space: pre-wrap; color: var(--text-2); font-size: 14.5px; background: rgba(4,9,16,.35); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.big-qty { font-family: var(--f-title); font-size: 30px; font-weight: 700; line-height: 1; }
.big-qty small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; font-family: var(--f-text); }
.quick-status { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-status button { border: 0; background: none; padding: 0; cursor: pointer; }
.quick-status .badge { opacity: .45; transition: opacity .15s; }
.quick-status button:hover .badge { opacity: .85; }
.quick-status .on .badge { opacity: 1; box-shadow: 0 0 0 1px var(--c), 0 0 14px color-mix(in srgb, var(--c) 35%, transparent); }
.hist { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; }
.hist div { display: flex; gap: 10px; }
.hist time { color: var(--faint); flex: none; font-variant-numeric: tabular-nums; }

/* usuários */
.users { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ucard { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ucard .top-u { display: flex; gap: 12px; align-items: center; }
.ucard .top-u b { display: block; font-weight: 600; }
.ucard .top-u small { color: var(--muted); }
.ucard .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.state { font-size: 12px; font-weight: 600; }
.state.on { color: var(--ok); }
.state.off { color: var(--warn); }

/* toasts */
#toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: #0f1a2c; border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 14px; animation: rise .2s ease; }
.toast .i { color: var(--cyan); }
.toast.err { border-color: rgba(242,112,122,.45); }
.toast.err .i { color: var(--danger); }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: currentColor; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

.fab { display: none; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .cal-wrap { grid-template-columns: 1fr; }
  .day-panel { position: static; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 24px 36px; gap: 24px; }
  .hero-logo { width: 96px; margin-bottom: 20px; }
  .hero-body h1 { font-size: 32px; }
  .hero-body p { font-size: 15px; margin-top: 14px; }
  .hero-tags, .hero-foot { display: none; }
  .login-side { padding: 28px 16px 48px; align-items: start; }
  .login-card { padding: 28px 22px; }

  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-bar {
    display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(6,11,19,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    justify-content: space-around;
  }
  .mobile-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 6px 10px; border-radius: 10px; min-width: 64px; }
  .mobile-bar a.on { color: var(--cyan); }
  .mobile-top { display: flex !important; }
  .main { padding: 16px 16px 110px; }
  .top { margin-bottom: 20px; }
  .top .btn-new { display: none; }
  .fab { display: grid; place-items: center; position: fixed; z-index: 41; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--grad); color: #031220; box-shadow: 0 10px 30px rgba(47,125,246,.5); cursor: pointer; }
  .fab .i { width: 24px; height: 24px; stroke-width: 2.2; }
  .hero-strip { grid-template-columns: 1fr; padding: 22px; }
  .hero-strip img { display: none; }
  .kpis { gap: 12px; }
  .kpi { padding: 14px 16px; }
  .kpi .val { font-size: 28px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .cal-grid { grid-auto-rows: minmax(64px, auto); }
  .day { padding: 5px; align-items: center; }
  .day .ev, .day .more { display: none; }
  .day .dots { display: flex; justify-content: center; }
  .cal-dow div { padding: 8px 0; text-align: center; letter-spacing: .04em; }
  .cal-head h2 { font-size: 18px; min-width: 0; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal-h, .modal-b, .modal-f { padding-left: 18px; padding-right: 18px; }
  .fg { grid-template-columns: repeat(2, 1fr); }
  .c2 { grid-column: span 1; } .c3, .c4, .c6 { grid-column: span 2; }
  .detail { grid-template-columns: 1fr; }
  .detail-media { border-right: 0; border-radius: 20px 20px 0 0; border-bottom: 1px solid var(--line); }
  .detail-media .big { flex: none; min-height: 0; aspect-ratio: 4/3; }
  .detail-info { padding: 20px 18px; }
  .list { overflow-x: auto; }
  .board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  #toasts { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-top .brand { padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
