/* ─────────────────────────────────────────────────────────────
   Simpp Sign — preparador de envelope (visualizador + marcação)
   Fase 1: UI-first. Backend de envio/assinatura entra depois.
   ───────────────────────────────────────────────────────────── */

.asse-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.asse-overlay.on { display: flex; }

/* ── Cabeçalho do preparador ─────────────────────────────── */
.asse-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.asse-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.asse-title-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-bg);
  color: var(--accent-t);
  font-size: 18px;
}
.asse-top .asse-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.asse-top .asse-title strong {
  font-size: 15px;
  color: var(--text);
  line-height: 1.2;
}
.asse-top .asse-title span {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asse-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}
.asse-steps .step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text3);
}
.asse-steps .step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.asse-steps .step.active { color: var(--accent); }
.asse-steps .step.active .num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.asse-steps .step.done { color: var(--green); }
.asse-steps .step.done .num {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.asse-steps .sep {
  width: 26px;
  height: 1.5px;
  background: var(--border2);
}
.asse-top .asse-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asse-top .asse-close:hover { background: var(--surface3); color: var(--text); }

/* ── Corpo ───────────────────────────────────────────────── */
.asse-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.asse-pane {
  width: 380px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  padding: 22px 24px 40px;
}
.asse-stage {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--surface2);
  padding: 28px 0 80px;
}

.asse-pane h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text3);
  margin: 0 0 12px;
}
.asse-pane h3:not(:first-child) { margin-top: 26px; }

.asse-pane-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 11px;
}
.asse-pane-section-head:first-child { margin-top: 0; }
.asse-pane-section-head > span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-bg);
  color: var(--accent-t);
  font-size: 16px;
}
.asse-pane-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.asse-pane-section-head p {
  margin: 2px 0 0;
  color: var(--text3);
  font-size: 10.5px;
  line-height: 1.35;
}

.asse-field { margin-bottom: 14px; }
.asse-field label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 5px;
}
.asse-field input[type="text"],
.asse-field input[type="email"],
.asse-field input[type="number"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.asse-field input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Documento ───────────────────────────────────────────── */
.asse-doc-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}
.asse-doc-opt.sel {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 8%,transparent);
}
.asse-doc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.asse-doc-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--text3);
  font-size: 17px;
}
.asse-doc-opt.sel .asse-doc-icon { background: var(--surface); color: var(--accent-t); }
.asse-doc-copy { display: block; min-width: 0; flex: 1; }
.asse-doc-opt .d-t { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; }
.asse-doc-opt .d-s { display: block; font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.asse-doc-check {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
}
.asse-doc-opt.sel .asse-doc-check { border-color: var(--accent); background: var(--accent); color: #fff; }
.asse-upload-wrap {
  margin: -1px 0 12px;
  padding: 0 3px;
}
.asse-upload-picker {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px dashed var(--border2);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.asse-upload-picker:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.asse-upload-picker-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--accent-t);
  font-size: 17px;
}
.asse-upload-picker-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.asse-upload-picker-copy strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.asse-upload-picker-copy small {
  overflow: hidden;
  color: var(--text3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asse-upload-picker em {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--surface2);
  color: var(--accent-t);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

/* ── Signatários ─────────────────────────────────────────── */
.asse-signer {
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}
.asse-signer .s-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.asse-signer .s-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.asse-signer .s-idx {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}
.asse-signer .s-del {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--text3);
  cursor: pointer;
  padding: 2px;
  font-size: 15px;
}
.asse-signer .s-del:hover { color: var(--red); }
.asse-add-signer {
  width: 100%;
  padding: 9px;
  border: 1.5px dashed var(--border2);
  border-radius: 9px;
  background: none;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.asse-add-signer:hover { border-color: var(--accent); color: var(--accent); }

/* ── Paleta de campos (passo 2) ──────────────────────────── */
.asse-signer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.asse-signer-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
}
.asse-signer-tab .s-dot { width: 9px; height: 9px; border-radius: 50%; }
.asse-signer-tab.active { border-color: currentColor; }

.asse-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border2);
  border-radius: 9px;
  background: var(--surface);
  cursor: grab;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.asse-palette-item:active { cursor: grabbing; }
.asse-palette-item i { font-size: 17px; color: var(--text3); }
.asse-palette-item .p-hint {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text3);
}

.asse-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text3);
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
}

/* ── Palco / páginas do PDF ──────────────────────────────── */
.asse-page-wrap {
  position: relative;
  margin: 0 auto 20px;
  box-shadow: var(--shadow);
  background: #fff;
  line-height: 0;
}
.asse-page-wrap canvas { display: block; }
.asse-page-layer {
  position: absolute;
  inset: 0;
  line-height: normal;
}
.asse-page-wrap.drop-ready .asse-page-layer {
  background: rgba(79,110,247,0.06);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.asse-page-num {
  position: absolute;
  top: 6px;
  left: -46px;
  font-size: 11px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

/* ── Caixa de campo colocada ─────────────────────────────── */
.asse-fbox {
  position: absolute;
  border: 1.5px solid;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: move;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 44px;
  min-height: 22px;
}
.asse-fbox .fb-label {
  pointer-events: none;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asse-fbox .fb-del {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--surface2);
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.asse-fbox:hover .fb-del { display: flex; }
.asse-fbox .fb-resize {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #fff;
  border: 1.5px solid currentColor;
  cursor: nwse-resize;
  display: none;
}
.asse-fbox:hover .fb-resize { display: block; }
.asse-fbox.readonly { cursor: default; }
.asse-fbox.readonly .fb-del,
.asse-fbox.readonly .fb-resize { display: none !important; }

/* ── Rodapé com ações ────────────────────────────────────── */
.asse-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.asse-foot .spacer { flex: 1; }
.asse-foot .asse-err {
  font-size: 12px;
  color: var(--red);
  margin-right: 8px;
}
.asse-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.asse-btn:hover { background: var(--surface2); }
.asse-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.asse-btn.primary:hover { background: var(--accent-d); }
.asse-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Passo 3: revisão ────────────────────────────────────── */
.asse-review {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 24px;
}
.asse-review h2 {
  font-family: inherit;
  font-size: 19px;
  color: var(--text);
  margin: 0 0 4px;
}
.asse-review .r-dek {
  font-size: 13px;
  color: var(--text3);
  margin: 0 0 22px;
}
.asse-review-intro { padding-top: 34px; }
.asse-intro-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 14px;
  background: var(--accent-bg);
  color: var(--accent-t);
  font-size: 24px;
}
.asse-document-summary {
  display: grid;
  gap: 7px;
  padding: 16px 17px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb,var(--accent) 28%,var(--border));
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}
.asse-document-summary > span { color: var(--text3); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.asse-document-summary > strong { color: var(--text); font-size: 14px; line-height: 1.4; font-weight: 650; }
.asse-document-summary > div { display: flex; flex-wrap: wrap; gap: 7px; }
.asse-document-summary small { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; background: var(--surface2); color: var(--text2); font-size: 10.5px; }
.asse-document-summary small i { color: var(--accent-t); font-size: 12px; }
.asse-flow-list { display: grid; gap: 0; margin-bottom: 17px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.asse-flow-list > div { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--border); }
.asse-flow-list > div:first-child { border-top: 0; }
.asse-flow-list > div > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-bg); color: var(--accent-t); font-size: 11px; font-weight: 700; }
.asse-flow-list p { display: grid; gap: 2px; margin: 0; }
.asse-flow-list strong { color: var(--text); font-size: 12px; font-weight: 650; }
.asse-flow-list small { color: var(--text3); font-size: 10.5px; line-height: 1.4; }
.asse-security-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border-radius: 10px; background: color-mix(in srgb,var(--green-bg) 62%,var(--surface)); color: var(--text2); font-size: 10.5px; line-height: 1.45; }
.asse-security-note i { flex: 0 0 auto; margin-top: 1px; color: var(--green); font-size: 15px; }
.asse-rcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.asse-rcard .rc-t {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text3);
  margin-bottom: 10px;
}
.asse-share-card { display: grid; gap: 11px; }
.asse-share-head { display: flex; align-items: center; gap: 9px; }
.asse-share-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-bg); color: var(--accent-t); font-size: 16px; }
.asse-share-head > div { display: grid; min-width: 0; }
.asse-share-head strong { color: var(--text); font-size: 12.5px; font-weight: 650; }
.asse-share-head span { color: var(--text3); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asse-share-card > label { color: var(--text2); font-size: 10.5px; font-weight: 600; }
.asse-share-message { width: 100%; min-height: 132px; resize: vertical; padding: 11px 12px; border: 1px solid var(--border2); border-radius: 9px; background: var(--surface2); color: var(--text2); font: 400 11.5px/1.5 'Inter',sans-serif; }
.asse-share-message:focus { outline: 2px solid color-mix(in srgb,var(--accent) 18%,transparent); border-color: var(--accent); }
.asse-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.asse-share-actions .asse-btn { justify-content: center; }
.asse-share-link { display: grid; grid-template-columns:auto minmax(0,1fr) 28px; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.asse-share-link > span { color: var(--text3); font-size: 9.5px; }
.asse-share-link code { min-width: 0; overflow: hidden; color: var(--text3); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.asse-share-link button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: var(--surface2); color: var(--accent-t); cursor: pointer; }
.asse-share-link button:hover { background: var(--accent-bg); }
.asse-rrow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-size: 13px;
}
.asse-rrow .k { color: var(--text3); }
.asse-rrow .v { color: var(--text); text-align: right; word-break: break-word; }
.asse-rrow .v.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
}
.asse-payload {
  background: #10182c;
  color: #d7deee;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  margin-top: 6px;
}

/* ── Loading ─────────────────────────────────────────────── */
.asse-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  color: var(--text3);
  font-size: 13px;
}
.asse-spin {
  width: 26px;
  height: 26px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: asse-spin 0.7s linear infinite;
}
@keyframes asse-spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .asse-body { flex-direction: column; }
  .asse-pane {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 40%;
  }
  .asse-steps .step span:not(.num) { display: none; }
  .asse-title-icon { display: none; }
  .asse-share-actions .asse-btn { flex: 1 1 180px; }
  .asse-upload-picker { grid-template-columns: 36px minmax(0, 1fr); }
  .asse-upload-picker em { grid-column: 2; justify-self: start; }
}

/* ─────────────────────────────────────────────────────────────
   Central "Assinatura eletrônica" (menu próprio)
   ───────────────────────────────────────────────────────────── */
.asc-topbar-title {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.asc-topbar-title .simpp-sign-quill-icon { width: 22px; height: 22px; margin-right: 8px; color: #fff; }
.asc-new-envelope {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  background: #fff;
  color: #1e4a8a;
  font: 650 12px 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.asc-new-envelope:hover { background: #eef5ff; transform: translateY(-1px); }
.asc-new-envelope i { font-size: 16px; }
.asc-central-content { width: 100%; max-width: 1120px !important; }

.asc-workspace {
  padding: 20px;
  border: 1px solid color-mix(in srgb,var(--text3) 18%,var(--border));
  border-radius: 17px;
  background: color-mix(in srgb,var(--surface2) 72%,var(--bg));
  box-shadow: 0 8px 24px rgba(15,38,70,.045);
}
.asc-filtros {
  display: grid;
  gap: 13px;
  margin-bottom: 16px;
}
.asc-filter-head { display: flex; align-items: end; gap: 12px; }
.asc-filter-copy { display: grid; gap: 3px; }
.asc-filter-copy strong { color: var(--text); font: 650 13px 'Inter',sans-serif; }
.asc-filter-copy span { color: var(--text2); font: 400 10px/1.4 'Inter',sans-serif; }
.asc-filter-tools { display: flex; align-items: center; gap: 10px; }
.asc-search { position: relative; flex: 1; min-width: 210px; }
.asc-search i { position: absolute; left: 12px; top: 50%; color: var(--text3); font-size: 15px; transform: translateY(-50%); pointer-events: none; }
.asc-chips { width: fit-content; max-width: 100%; display: flex; flex: 0 0 auto; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); }
.asc-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text3);
  font: 500 10px 'Inter',sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s,background .15s,color .15s;
}
.asc-chip i { font-size: 15px; }
.asc-chip:hover { color: var(--text2); }
.asc-chip.on { background: var(--surface); color: var(--accent-t); box-shadow: var(--shadow-sm); }
.asc-busca {
  width: 100%;
  min-height: 38px;
  padding: 0 13px 0 35px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: 400 10.5px 'Inter',sans-serif;
}
.asc-busca:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent); }

.asc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 12px;
}
.asc-card {
  --asc-status-color: var(--accent);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid color-mix(in srgb,var(--text3) 20%,var(--border));
  border-radius: 15px;
  padding: 15px;
  cursor: pointer;
  transition: border-color .15s,box-shadow .15s,transform .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(17,44,78,.04);
}
.asc-card::before { content:''; position:absolute; inset:0 0 auto; height:3px; background:var(--asc-status-color); }
.asc-card:hover { border-color: color-mix(in srgb,var(--asc-status-color) 42%,var(--border)); box-shadow: 0 11px 24px rgba(17,44,78,.09); transform: translateY(-2px); }
.asc-card:focus-visible { outline: 3px solid color-mix(in srgb,var(--accent) 22%,transparent); outline-offset: 2px; }
.asc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asc-card-doc-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb,var(--asc-status-color) 11%,var(--surface2)); color: var(--asc-status-color); font-size: 18px; }
.asc-badge {
  font-size: 9.5px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.asc-card-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asc-card-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text2);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asc-card-sub i { flex: 0 0 auto; color: var(--accent-t); font-size: 13px; }
.asc-card-progress { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--surface2); }
.asc-card-progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text2); font-size: 9px; }
.asc-card-progress-copy strong { color: var(--text); font-size: 10px; font-weight: 650; }
.asc-progress {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb,var(--text3) 17%,var(--surface));
  overflow: hidden;
}
.asc-progress-bar { height: 100%; background: var(--asc-status-color); border-radius: 3px; transition: width .3s; }
.asc-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text3);
  font-size: 9px;
}
.asc-card-date { display: inline-flex; align-items: center; gap: 5px; }
.asc-card-date i { font-size: 12px; }
.asc-card-open { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--accent-t); font-weight: 600; }
.asc-card-open i { font-size: 12px; transition: transform .15s; }
.asc-card:hover .asc-card-open i { transform: translateX(2px); }
.asc-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  background: color-mix(in srgb,var(--asc-status-color) 11%,transparent);
  color: var(--asc-status-color);
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}
.asc-status i { font-size: 7px; }
.asc-tag {
  font-size: 8.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
}
.asc-tag.amber { background: var(--amber-bg); color: var(--amber); }

.asc-vazio {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 54px 20px;
  border: 1px dashed var(--border2);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text3);
}
.asc-vazio > i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--accent-bg); color: var(--accent-t); font-size: 23px; }
.asc-vazio p { margin: 12px 0 4px; font-size: 13px; color: var(--text); font-weight: 650; }
.asc-vazio span { max-width: 420px; font-size: 10.5px; line-height: 1.5; }
.asc-empty-action { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; padding: 0 12px; border: 0; border-radius: 9px; background: #245a9c; color: #fff; font: 600 10px 'Inter',sans-serif; cursor: pointer; }
.asc-empty-action:hover { background: #1d4b84; }

/* ── drawer de detalhe ─────────────────────────────────── */
.asc-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 3800;
  background: rgba(20, 30, 50, 0.4);
  display: none;
  justify-content: flex-end;
}
.asc-drawer-overlay.on { display: flex; }
.asc-drawer {
  width: 460px;
  max-width: 92vw;
  height: 100%;
  background: color-mix(in srgb,var(--surface2) 72%,var(--bg));
  overflow-y: auto;
  padding: 22px 24px 60px;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
}
.asc-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.asc-drawer-title { font-size: 17px; font-weight: 650; color: var(--text); margin-bottom: 7px; line-height: 1.3; }
.asc-drawer-cli { font-size: 13px; color: var(--text2); margin-bottom: 18px; }
.asc-drawer-cli b { color: var(--text); }
.asc-drawer-sec { margin-top: 16px; padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.asc-drawer-sec h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text3);
  margin: 0 0 12px;
}
.asc-sig-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.asc-sig-row:first-of-type { border-top: none; }
.asc-sig-nome { font-size: 12px; font-weight: 600; color: var(--text); }
.asc-sig-mail { margin-top: 2px; font-size: 10px; color: var(--text3); }
.asc-sig-st {
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.asc-sig-st span { display: block; font-size: 11px; font-weight: 400; color: var(--text3); }
.asc-drawer-acoes { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.asc-drawer-acoes .asse-btn { width: 100%; }

.asc-tl { display: flex; flex-direction: column; }
.asc-tl-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}
.asc-tl-item::before {
  content: '';
  position: absolute;
  left: 13.5px;
  top: 26px;
  bottom: 0;
  width: 1.5px;
  background: var(--border);
}
.asc-tl-item:last-child { padding-bottom: 0; }
.asc-tl-item:last-child::before { display: none; }
.asc-tl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 14px;
  z-index: 1;
}
.asc-tl-txt { font-size: 11px; color: var(--text); }
.asc-tl-meta { font-size: 9.5px; color: var(--text3); margin-top: 2px; }

@media (max-width: 900px) {
  .asc-filter-tools { align-items:stretch; flex-direction:column; }
  .asc-chips { flex:1; }
  .asc-search { min-width:0; }
}
@media (max-width: 620px) {
  .asc-workspace { padding:14px; border-radius:14px; }
  .asc-chip { min-height:32px; }
  .asc-grid { grid-template-columns: 1fr; }
  .asc-new-envelope { width:36px; padding:0; font-size:0; }
  .asc-new-envelope i { font-size:17px; }
}
