:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #0f1f2b;
  --muted: #5a6b79;
  --line: #d9e1e7;
  --primary: #0f2a3d;
  --primary-2: #1b4361;
  --accent: #16a34a;
  --accent-ink: #ffffff;
  --accent-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #1d4ed8;
  --info-soft: #dbeafe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 31, 43, .06), 0 4px 16px rgba(15, 31, 43, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.hidden { display: none !important; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); }
.boot img { border-radius: 18px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1200px 600px at 10% -10%, #1b4361 0%, transparent 60%), var(--primary); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand img { width: 48px; height: 48px; border-radius: 12px; }
.login-brand h1 { font-size: 20px; }
.login-brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--primary); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { display: block; font-weight: 500; opacity: .7; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.net-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.net-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.net-chip.online .dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.net-chip.syncing .dot { background: #fbbf24;  }
.net-chip .badge { background: #fbbf24; color: #3b2600; border-radius: 999px; padding: 0 7px; font-weight: 700; font-size: 12px; }

.layout { display: grid; grid-template-columns: 1fr; min-height: 0; }
.sidenav { display: none; }
.main { padding: 16px 16px calc(88px + var(--safe-b)); max-width: 980px; width: 100%; margin: 0 auto; min-width: 0; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.bottomnav a {
  flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 10px;
  text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a.active { color: var(--primary); }
.bottomnav a.active svg { color: var(--accent); }

@media (min-width: 900px) {
  .layout { grid-template-columns: 260px 1fr; }
  .sidenav { display: block; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow: auto; }
  .bottomnav { display: none; }
  .main { padding: 24px 28px 48px; }
}
.sidenav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 14px 10px 6px; font-weight: 700; }
.sidenav a, .sidenav .soon {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600;
}
.sidenav a svg, .sidenav .soon svg { width: 20px; height: 20px; color: var(--muted); }
.sidenav a:hover { background: var(--surface-2); }
.sidenav a.active { background: var(--accent-soft); color: #14532d; }
.sidenav a.active svg { color: var(--accent); }
.sidenav .soon { color: var(--muted); font-weight: 500; cursor: default; }
.sidenav .soon { font-size: 14px; }
.sidenav .soon em { white-space: nowrap; margin-left: auto; font-style: normal; font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 999px; }

/* ---------- Page bits ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.back { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-pad { padding: 16px; }
.section { padding: 16px; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section h2 .num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-size: 12px; }
.section h2 .req { color: var(--danger); font-weight: 700; }
.section h2 .aside { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr; }
.grid-3 > :first-child { grid-column: 1 / -1; } /* celular: Data na linha de cima, Início e Término lado a lado */
.grid > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
@media (min-width: 640px) {
  .grid-3 > :first-child { grid-column: auto; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.span-all { grid-column: 1 / -1; }

label.field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field > input, label.field > select, label.field > textarea { margin-top: 6px; display: block; }
label.field .req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=month], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 16px; color: var(--ink); font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
/* Lista de sugestões própria (tema, local, participante, função, empresa) */
.ac-wrap { position: relative; }
label.field > .ac-wrap { margin-top: 6px; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,31,43,.18); max-height: min(240px, 42vh); overflow: auto; overscroll-behavior: contain; }
.ac-item { padding: 11px 12px; border-bottom: 1px solid var(--surface-2); cursor: pointer; font-weight: 600; color: var(--ink); font-size: 15px; }
.ac-item small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ac-item:hover, .ac-item.on { background: var(--accent-soft); }
/* Campos de data e hora: no iPhone/Android eles têm largura e altura próprias e "vazam" da coluna. */
input[type=date], input[type=time], input[type=month], input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 1.3; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value, input[type=month]::-webkit-date-and-time-value, input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { opacity: .6; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(27, 67, 97, .15); }
.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 12px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--primary); color: #fff; }
.seg-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-danger { background: var(--surface); border-color: #fca5a5; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn-block { width: 100%; white-space: normal; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.fab {
  position: fixed; right: 16px; bottom: calc(76px + var(--safe-b)); z-index: 19;
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(22,163,74,.4); text-decoration: none;
}
.fab svg { width: 20px; height: 20px; }
@media (min-width: 900px) { .fab { display: none; } }
.only-desktop { display: none; }
@media (min-width: 900px) { .only-desktop { display: inline-flex; } }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-warn { background: var(--warn-soft); color: #78350f; }
.alert-danger { background: var(--danger-soft); color: #7f1d1d; }
.alert-info { background: var(--info-soft); color: #1e3a8a; }
.alert-ok { background: var(--accent-soft); color: #14532d; }

/* ---------- Lista de DDS ---------- */
.filters { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .filters { grid-template-columns: 1fr 160px 160px; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.dds-list { display: grid; gap: 10px; }
.dds-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.dds-item:hover { border-color: #b9c6d0; }
.date-box { width: 52px; text-align: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 0; }
.date-box b { display: block; font-size: 19px; line-height: 1; }
.date-box span { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dds-item h3 { font-size: 15px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dds-item .meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dds-item .meta span { display: inline-flex; align-items: center; gap: 4px; }
.dds-item .meta svg { width: 14px; height: 14px; }
.dds-item > div:nth-child(2) { min-width: 0; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .2px; white-space: nowrap; }
.tag-type { background: var(--primary); color: #fff; }
.tag-rascunho { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag-pendente { background: var(--warn-soft); color: var(--warn); }
.tag-sincronizado { background: var(--accent-soft); color: #15803d; }
.tag-erro { background: var(--danger-soft); color: var(--danger); }
.tags { display: flex; gap: 6px; flex-direction: row; flex-wrap: wrap; grid-column: 2; }
.dds-item { grid-template-columns: auto 1fr; row-gap: 8px; }
.dds-item .date-box { grid-row: span 2; align-self: start; }
@media (min-width: 640px) {
  .dds-item { grid-template-columns: auto 1fr auto; }
  .dds-item .date-box { grid-row: auto; align-self: center; }
  .tags { grid-column: auto; flex-direction: column; align-items: flex-end; }
}

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: #9fb0bd; }
.empty h3 { color: var(--ink); margin: 8px 0 4px; }

/* ---------- Participantes ---------- */
.part-list { display: grid; gap: 8px; margin-bottom: 12px; }
.part {
  display: grid; grid-template-columns: 26px 1fr 72px auto; gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.part .n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.part b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part > div { min-width: 0; }
.part img { width: 72px; height: 34px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
@media (min-width: 640px) { .part { grid-template-columns: 28px 1fr 110px auto; } .part img { width: 110px; } }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.danger { color: var(--danger); }

/* ---------- Fotos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(15,31,43,.75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo button svg { width: 16px; height: 16px; }
.photo-add { aspect-ratio: 4/3; border: 2px dashed #b9c6d0; border-radius: 10px; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; background: var(--surface); }
.photo-add svg { width: 26px; height: 26px; }
.photo-add input { display: none; }

/* ---------- GPS ---------- */
.gps { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gps-box { flex: 1; min-width: 200px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.gps-box b { font-variant-numeric: tabular-nums; }
.gps-box small { color: var(--muted); display: block; }

/* ---------- Assinatura ---------- */
.sig-preview { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sig-preview img { height: 70px; width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.sig-pad-wrap { position: relative; border: 2px dashed #b9c6d0; border-radius: 12px; background: #fff; touch-action: none; }
.sig-pad-wrap canvas { display: block; width: 100%; height: 200px; border-radius: 12px; touch-action: none; cursor: crosshair; }
.sig-pad-wrap .line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-bottom: 1.5px solid #cbd5e1; pointer-events: none; }
.sig-pad-wrap .hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #94a3b8; font-size: 12.5px; pointer-events: none; }

/* ---------- Ações fixas do formulário ---------- */
.form-actions {
  position: sticky; bottom: calc(64px + var(--safe-b)); z-index: 10; margin-top: 16px;
  display: flex; gap: 10px; padding: 12px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-actions .btn { flex: 1; }
@media (min-width: 900px) { .form-actions { bottom: 16px; } .form-actions .btn { flex: 0 0 auto; } .form-actions .grow { flex: 1; } }

/* ---------- Detalhe ---------- */
.kv { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv div { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.prose { white-space: pre-wrap; }

/* ---------- Tabela usuários ---------- */
.users { display: grid; gap: 10px; }
.user-row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px; }
@media (min-width: 720px) { .user-row { grid-template-columns: 1fr 150px 130px auto; align-items: center; } }
.user-row b { display: block; }
.user-row small { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.switch input { width: 40px; height: 22px; appearance: none; background: #cbd5e1; border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,31,43,.55); display: flex; align-items: flex-end; justify-content: center; }
.atualizacao-obrigatoria{position:fixed;inset:0;margin:auto;width:calc(100% - 32px);max-width:480px;max-height:calc(100dvh - 32px);overflow:auto;padding:28px;border:2px solid #b91c1c;border-radius:18px;background:#fff7f7;color:#991b1b;box-shadow:0 24px 70px rgba(0,0,0,.3);text-align:center}
.atualizacao-obrigatoria::backdrop{background:rgba(15,31,43,.72)}
.atualizacao-obrigatoria h2{margin:14px 0;font-size:24px;color:#991b1b}
.atualizacao-obrigatoria p{line-height:1.5}
.atualizacao-selo{font-size:12px;font-weight:800;letter-spacing:.06em}
.atualizacao-versoes{padding:14px;border:1px solid #fecaca;border-radius:10px;background:#fff}
.atualizacao-obrigatoria .btn{width:100%;min-height:48px;margin-top:8px}
.atualizacao-obrigatoria #atualizacao-erro:empty{display:none}
@media(max-width:640px){.atualizacao-obrigatoria{padding:22px 18px}}
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 24px; } }
.modal { width: 100%; max-width: 560px; max-height: 94vh; overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + var(--safe-b)); }
@media (min-width: 640px) { .modal { border-radius: 18px; padding: 22px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 18px; }
.modal .btn-row { margin-top: 16px; }
.modal .btn-row .btn { flex: 1; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%) translateY(20px); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none;
  transition: all .2s; max-width: calc(100vw - 32px); display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast.err { background: var(--danger); }
#toast.ok { background: #15803d; }
#toast button { background: #fff; color: var(--ink); border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 800; cursor: pointer; }
@media (min-width: 900px) { #toast { bottom: 24px; } }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* DDS: parágrafo contínuo, justificado, sem linhas vazias ou espaços extras. */
.prose.dds-conteudo{white-space:normal;text-align:justify;text-align-last:left;hyphens:auto;overflow-wrap:break-word;word-spacing:normal;letter-spacing:normal}

/* Câmera: orientação somente sobre a prévia, sem compor a imagem. */
.camera-modal{max-width:880px;padding:14px;background:#101813;color:#fff;border-radius:14px;max-height:96dvh}.camera-topo{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.camera-topo h2{margin:0;font-size:17px;color:#fff}.camera-topo .icon-btn{color:#fff;background:#ffffff15;border-color:#ffffff30}.camera-previa{position:relative;width:100%;background:#080c09;border-radius:9px;overflow:hidden;min-height:180px}.camera-previa video{display:block;width:100%;height:min(65dvh,540px);object-fit:contain;background:#080c09}.camera-giro{display:none;position:absolute;left:50%;bottom:18px;transform:translateX(-50%);align-items:center;gap:9px;max-width:calc(100% - 24px);width:max-content;padding:9px 12px;border-radius:8px;background:#17251de8;color:#fff;font-size:12px;line-height:1.4;pointer-events:none}.foto-dispositivo{display:block;width:29px;height:19px;border:2px solid currentColor;border-radius:4px;flex-shrink:0;position:relative}.foto-dispositivo:after{content:'';position:absolute;width:2px;height:5px;right:2px;top:5px;background:currentColor}.camera-status{position:absolute;inset:40% 12px auto;text-align:center;color:#eee;font-size:13px}.camera-status[hidden]{display:none}.camera-erro{color:#ffd3cb;font-size:13px;line-height:1.5;margin:10px 0}.camera-erro:empty{display:none}.camera-acoes{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.camera-acoes .btn{min-height:44px}.camera-acoes [data-native]{font-size:12px;background:transparent;color:#e8f2eb;border-color:#83968a}.camera-acoes [hidden]{display:none}
@media(orientation:portrait){.camera-pronta .camera-giro{display:flex}}
@media(orientation:landscape) and (max-height:560px){.camera-modal{padding:10px;max-height:100dvh}.camera-previa video{height:calc(100dvh - 120px)}.camera-topo{margin-bottom:6px}.camera-acoes{margin-top:8px}}

.user-row .user-last-access{display:flex;align-items:flex-start;gap:5px;margin-top:6px;color:var(--muted);font-size:12px;line-height:1.5}.user-last-access svg{width:13px;height:13px;flex-shrink:0;margin-top:2px}.user-last-access span{overflow-wrap:anywhere}
