/* DualOficina additions on top of the shared glass styles (styles.css). */

.brand em { color: #a9c8ee; }
.drawer { width: min(580px, calc(100vw - 28px)); }

/* ---------- Gate (sign in / sign up / onboarding) ---------- */
.gate { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.gate[hidden], #shell[hidden] { display: none; }
.gate-card { width: min(420px, 100%); border-radius: 30px; padding: 30px 28px; background: rgba(var(--glass-rgb), .42);
  border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 40px 80px -30px rgba(20,25,40,.5); animation: reveal .7s var(--ease) both; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 22px; }
.gate-brand em { font-style: normal; color: var(--accent); }
.gate-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 60%, var(--accent-3)); }
.gate h1 { font-size: 26px; margin-bottom: 4px; }
.gate .sub { margin: 0 0 18px; }
.gate .form { grid-template-columns: 1fr; margin-top: 8px; }
.gate .btn.dark { width: 100%; padding: 13px; }
.gate-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.gate-links button { color: var(--accent-3); font-weight: 700; padding: 0; }
.gate-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.85); }
.gate-foot a { color: #fff; }
.gate-msg { font-size: 13px; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; background: rgba(255,255,255,.6); }
.gate-msg.bad { color: var(--bad); background: rgba(200,65,47,.1); }
.gate-msg.ok { color: var(--ok); background: rgba(47,143,91,.1); }

/* ---------- Line editor (jobs and quotes) ---------- */
.lines { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.lines td { padding: 4px 3px; border: 0; white-space: normal; }
.lines input, .lines select { width: 100%; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.85); border-radius: 9px; padding: 7px 8px; font-size: 12.5px; outline: none; }
.lines input:focus, .lines select:focus { border-color: var(--accent-2); }
.lines .n input { text-align: right; }
.lines .del { width: 28px; height: 28px; border-radius: 50%; background: rgba(200,65,47,.1); color: var(--bad); font-size: 12px; }
.lines-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.totals { display: grid; gap: 4px; margin-top: 12px; font-size: 13px; }
.totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.totals b { color: var(--ink); font-variant-numeric: tabular-nums; }
.totals .big-line { font-size: 16px; padding-top: 8px; border-top: 1px solid rgba(31,27,23,.12); }
.margin-pos { color: var(--ok) !important; } .margin-neg { color: var(--bad) !important; }

/* ---------- Plate and QR ---------- */
.plate { display: inline-flex; align-items: stretch; border: 1.5px solid #1f1b17; border-radius: 6px; overflow: hidden; font-family: ui-monospace, Menlo, monospace;
  font-weight: 800; font-size: 12px; letter-spacing: .06em; background: #fff; color: #1f1b17; line-height: 1; }
.plate::before { content: "P"; background: #2f4fb5; color: #fff; padding: 4px 4px 3px; font-size: 9px; display: flex; align-items: flex-end; }
.plate span { padding: 4px 6px; }
.qrbox { display: grid; place-items: center; background: #fff; border-radius: 16px; padding: 14px; width: fit-content; margin: 8px auto; }
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-3); }

/* ---------- Kanban for tasks ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }

[data-theme="dark"] .lines input, [data-theme="dark"] .lines select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--ink); }
[data-theme="dark"] .plate { background: #f2ece6; }
[data-theme="dark"] .gate-card { background: rgba(var(--night-rgb), .7); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .gate-msg { background: rgba(255,255,255,.08); }
@media (max-width: 760px) { .kanban { grid-template-columns: repeat(3, 80vw); } }
