* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #111827;
  -webkit-font-smoothing: antialiased;
}
html, body { height: 100%; }
#app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.sf-progress { position: sticky; top: 0; z-index: 30; height: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.sf-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #A78BFA, #C4B5FD); transition: width 0.25s ease; }
.sf-progress-pct {
  position: fixed; top: 10px; right: 16px; z-index: 31;
  font-size: 11.5px; font-weight: 700; color: #6D28D9;
  background: #fff; padding: 3px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: none;
}
.sf-progress-pct.active { display: block; }

.sf-appheader {
  background: #1E1033; color: #fff; padding: 11px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.sf-appheader-left { display: flex; align-items: center; gap: 6px; }
.sf-appheader-right { display: flex; align-items: center; gap: 14px; }
.sf-topbar-brand { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.sf-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; padding: 0; margin-right: 4px;
}
.sf-hamburger span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
.sf-lang-switch { display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,0.08); border-radius: 7px; padding: 2px; }
.sf-lang-opt { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #94a3b8; padding: 4px 8px; border-radius: 5px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.sf-lang-opt:hover { color: #fff; }
.sf-lang-opt.active { background: #7C3AED; color: #fff; }
.sf-topbar-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #8B5CF6, #C026D3);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.sf-appheader h1 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.sf-appheader .sf-user { font-size: 12.5px; color: #cbd5e1; }
.sf-appheader .sf-link { color: #94a3b8; font-size: 12.5px; cursor: pointer; transition: color 0.15s; }
.sf-appheader .sf-link:hover { color: #fff; }

.sf-notif-wrap { position: relative; }
.sf-notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent;
  color: #94a3b8; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.sf-notif-bell:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sf-notif-bell .sf-icon { width: 18px; height: 18px; }
.sf-notif-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px;
  background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px;
  text-align: center; border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.sf-notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-height: 420px; overflow-y: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.18); z-index: 50; color: #111827;
}
.sf-notif-panel-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid #f1f3f6; font-size: 12.5px; font-weight: 700;
}
.sf-notif-panel-header .sf-link { font-weight: 500; font-size: 12px; }
.sf-notif-list { padding: 6px; }
.sf-notif-empty { padding: 24px 14px; text-align: center; color: #9ca3af; font-size: 12.5px; }
.sf-notif-item {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 10px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
}
.sf-notif-item:hover { background: #f6f7f9; }
.sf-notif-item-title { font-size: 12.5px; font-weight: 700; color: #111827; }
.sf-notif-item-body { font-size: 12px; color: #4b5563; }
.sf-notif-item-date { font-size: 10.5px; color: #9ca3af; margin-top: 2px; }
.sf-notif-item-unread { background: #F5F3FF; }
.sf-notif-item-unread:hover { background: #e0ecfe; }
.sf-notif-item-unread .sf-notif-item-title::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: #7C3AED; margin-right: 6px;
}

@media (max-width: 860px) {
  .sf-notif-panel { width: 280px; right: -40px; }
}

/* Mail-client style shell: persistent left sidebar + scrollable content pane */
.sf-shell { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.sf-sidebar {
  width: 216px; flex-shrink: 0; background: #fff; border-right: 1px solid #eceef1;
  padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.sf-sidebar-cta {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-bottom: 14px;
}
.sf-sidebar-cta .sf-icon { width: 15px; height: 15px; }
.sf-sidebar > .sf-link { text-align: center; margin-bottom: 14px; font-size: 12.5px; }
.sf-sidebar-group { margin-bottom: 6px; }
.sf-sidebar-group-title {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #9ca3af; padding: 6px 10px 4px;
}
.sf-sidebar-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #374151; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.sf-sidebar-item:hover { background: #f3f4f6; }
.sf-sidebar-item.active { background: #F5F3FF; color: #6D28D9; font-weight: 700; }
.sf-sidebar-item .sf-icon { width: 16px; height: 16px; color: #9ca3af; flex-shrink: 0; }
.sf-sidebar-item.active .sf-icon { color: #7C3AED; }

.sf-shell-main { flex: 1; min-width: 0; overflow-y: auto; padding: 24px 28px 40px; }

.sf-sidebar-backdrop { display: none; }

.sf-main { flex: 1; padding: 26px 24px 40px; max-width: 1120px; margin: 0 auto; width: 100%; }

/* Narrow / phone-width viewports: sidebar becomes a slide-in drawer opened
   via the hamburger button, editor/stat grids stack to a single column. */
@media (max-width: 860px) {
  .sf-hamburger { display: flex; }
  .sf-appheader { padding: 10px 14px; }
  .sf-appheader .sf-user { display: none; }
  .sf-appheader-right { gap: 10px; }

  .sf-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 41; width: 240px;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 2px 0 16px rgba(0,0,0,0.15);
  }
  .sf-shell.sf-sidebar-open .sf-sidebar { transform: translateX(0); }
  .sf-sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 40;
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  }
  .sf-shell.sf-sidebar-open .sf-sidebar-backdrop { opacity: 1; pointer-events: auto; }

  .sf-shell-main { padding: 16px 14px 32px; }
  .sf-editor-grid { grid-template-columns: 1fr; }
  .sf-status-grid { grid-template-columns: 1fr; }
  .sf-stat-row { grid-template-columns: repeat(2, 1fr); }
  table.sf-table { display: block; overflow-x: auto; white-space: nowrap; }
  .sf-home-hero { padding: 22px 18px; }
  .sf-kpi-row { grid-template-columns: 1fr; }
}

.sf-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.sf-row-between h2 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.01em; }

.sf-icon { width: 15px; height: 15px; flex-shrink: 0; }

.sf-btn { border: none; border-radius: 8px; padding: 10px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.sf-btn-primary { background: #7C3AED; color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,0.25); }
.sf-btn-primary:hover:not(:disabled) { background: #6D28D9; }
.sf-btn-primary:disabled { background: #a8c3f5; cursor: not-allowed; box-shadow: none; }
.sf-btn-secondary { background: #eef0f3; color: #111827; }
.sf-btn-secondary:hover:not(:disabled) { background: #e2e5ea; }
.sf-btn-danger { background: #fff; color: #dc2626; border: 1px solid #fca5a5; }
.sf-btn-danger:hover { background: #fef2f2; }
.sf-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

table.sf-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); }
table.sf-table th, table.sf-table td { text-align: left; padding: 13px 16px; font-size: 13px; border-bottom: 1px solid #f1f3f6; }
table.sf-table th { background: #fafbfc; font-weight: 600; color: #4b5563; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
table.sf-table tbody tr:last-child td { border-bottom: none; }
table.sf-table tbody tr:hover { background: #fafbff; }
.sf-doc-row { cursor: pointer; }
.sf-doc-title-cell { font-weight: 600; color: #111827; }
.sf-doc-row:hover .sf-doc-title-cell { color: #7C3AED; text-decoration: underline; }
.sf-row-actions, .sf-row-checkbox { cursor: default; }
.sf-row-checkbox { width: 34px; text-align: center; }
.sf-row-checkbox input { width: 15px; height: 15px; cursor: pointer; }

.sf-bulk-bar {
  display: flex; align-items: center; gap: 14px; background: #F5F3FF; border: 1px solid #DDD6FE;
  border-radius: 9px; padding: 10px 14px; margin: -6px 0 14px; font-size: 12.5px; color: #4C1D95;
}

.sf-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; }
.sf-badge-draft { background: #f1f3f6; color: #4b5563; }
.sf-badge-sent { background: #EDE9FE; color: #6D28D9; }
.sf-badge-completed { background: #dcfce7; color: #15803d; }
.sf-badge-declined { background: #fee2e2; color: #b91c1c; }
.sf-badge-amber { background: #fef3c7; color: #92400e; }
.sf-ticket-payment-email { font-size: 12px; color: #92400e; background: #fffbeb; border-radius: 7px; padding: 6px 10px; margin: 4px 0 8px; display: inline-block; }

.sf-empty { text-align: center; padding: 70px 20px; color: #6b7280; background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); font-size: 13.5px; }

.sf-template-disclaimer { font-size: 12px; color: #6b7280; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 9px; padding: 9px 13px; margin: -8px 0 18px; }
.sf-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sf-template-card {
  background: #fff; border-radius: 12px; padding: 18px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s;
}
.sf-template-card:hover { border-color: #C4B5FD; transform: translateY(-1px); }
.sf-template-category { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; }
.sf-template-card h3 { font-size: 14.5px; margin: 0 0 6px; font-weight: 700; letter-spacing: -0.01em; }
.sf-template-card p { font-size: 12.5px; color: #6b7280; margin: 0 0 12px; line-height: 1.45; min-height: 34px; }

.sf-editor-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.sf-status-grid { display: grid; grid-template-columns: minmax(420px, 1.3fr) 1fr; gap: 18px; align-items: start; }
.sf-panel { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); }
.sf-panel h3 { font-size: 12px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; font-weight: 700; }

.sf-template-layout { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; gap: 20px; align-items: start; margin-top: 10px; }
.sf-template-form { width: 100%; }
.sf-template-preview-pane { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); overflow: hidden; position: sticky; top: 16px; }
.sf-template-preview-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #f1f3f6; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; }
.sf-template-preview-status { text-transform: none; letter-spacing: normal; font-weight: 500; color: #9ca3af; }
.sf-template-preview-frame { display: block; width: 100%; height: 86vh; background: #f3f4f6; overflow-y: auto; padding: 16px; box-sizing: border-box; }
.sf-template-preview-page { display: block; margin: 0 auto 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.15); border-radius: 2px; max-width: 100%; height: auto; }
@media (max-width: 860px) {
  .sf-template-layout { grid-template-columns: 1fr; }
  .sf-template-preview-pane { position: static; }
  .sf-template-preview-frame { height: 60vh; }
}

.sf-recipient-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; margin-bottom: 6px; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; transition: background 0.15s; }
.sf-recipient-item:hover { background: #f8fafc; }
.sf-recipient-item.active { background: #F5F3FF; border-color: #C4B5FD; }
.sf-recipient-item .sf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.sf-recipient-item .sf-remove { color: #dc2626; cursor: pointer; font-size: 11px; }
.sf-recipient-item .sf-order-num { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; background: #F5F3FF; color: #4338ca; font-size: 10px; font-weight: 700; margin-right: 6px; }
.sf-recipient-actions { display: flex; align-items: center; gap: 8px; }
.sf-reorder { color: #6b7280; cursor: pointer; font-size: 12px; font-weight: 700; padding: 0 2px; }
.sf-reorder:hover { color: #7C3AED; }
.sf-reorder.sf-disabled { color: #d1d5db; pointer-events: none; }
.sf-checkbox-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: #1f2937; margin-top: 12px; cursor: pointer; }
.sf-checkbox-row input { width: 14px; height: 14px; }

/* Pantalla inicial "quien firma" (al estilo DocuSign), antes de mostrar
   cualquier formulario de firmantes. */
.sf-mode-choice { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.sf-mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; text-align: left; padding: 14px 16px; border-radius: 10px;
  border: 1px solid #e5e7eb; background: #fff; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.sf-mode-card:hover { border-color: #C4B5FD; background: #f8fafc; }
.sf-mode-card-icon { color: #7C3AED; margin-bottom: 2px; }
.sf-mode-card-icon .sf-icon { width: 20px; height: 20px; }
.sf-mode-card-title { font-size: 14px; font-weight: 700; color: #111827; }
.sf-mode-card-hint { font-size: 12px; color: #6b7280; line-height: 1.4; }

.sf-wizard-sub { font-size: 12.5px; color: #6b7280; margin: -4px 0 12px; }
.sf-wizard-signer-block { border: 1px solid #e5e7eb; border-radius: 9px; padding: 10px 12px 4px; margin-bottom: 10px; }
.sf-wizard-signer-block label { margin-top: 0; font-size: 11.5px; font-weight: 700; color: #7C3AED; text-transform: uppercase; letter-spacing: 0.03em; }
.sf-wizard-signer-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sf-wizard-signer-order { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.sf-wizard-signer-trash { color: #9ca3af; cursor: pointer; display: inline-flex; padding: 2px; border-radius: 5px; }
.sf-wizard-signer-trash:hover { color: #dc2626; background: #fef2f2; }
.sf-wizard-signer-trash .sf-icon { width: 15px; height: 15px; }
.sf-wizard-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #F5F3FF; border: 1px solid #DDD6FE; color: #6D28D9;
  font-size: 12.5px; padding: 10px 14px; border-radius: 9px; margin-bottom: 12px; line-height: 1.4;
}
.sf-wizard-banner-close { cursor: pointer; font-size: 16px; line-height: 1; color: #C4B5FD; flex-shrink: 0; }
.sf-wizard-banner-close:hover { color: #6D28D9; }

label { display: block; font-size: 12px; margin: 10px 0 5px; color: #374151; font-weight: 500; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"] {
  width: 100%; padding: 8px 9px; border: 1px solid #d1d5db; border-radius: 7px; font-size: 12.5px;
  font-family: inherit; transition: border-color 0.15s;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="date"]:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.sf-pdf-area { max-height: 78vh; overflow-y: auto; }
.sf-page { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.15); margin: 0 auto 16px; cursor: crosshair; border-radius: 2px; }
.sf-page canvas { display: block; pointer-events: none; }

.sf-field-box {
  position: absolute; border: 2px solid; border-radius: 5px; font-size: 10px;
  display: flex; align-items: center; justify-content: center; padding: 2px; text-align: center;
  user-select: none;
}
.sf-field-box .sf-field-x { position: absolute; top: -8px; right: -8px; background: #dc2626; color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 11px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,0.2); z-index: 2; }
.sf-field-caption { position: absolute; font-size: 9px; color: #6b7280; text-align: center; pointer-events: none; user-select: none; }
.sf-field-box .sf-field-resize {
  position: absolute; bottom: -6px; right: -6px; width: 14px; height: 14px; border-radius: 3px;
  background: #fff; border: 2px solid currentColor; cursor: nwse-resize; box-shadow: 0 1px 2px rgba(0,0,0,0.2); z-index: 2;
}

.sf-hint-box { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12.5px; padding: 11px 14px; border-radius: 9px; margin-bottom: 16px; }

.sf-value-prop {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin-bottom: 14px;
  border-radius: 12px; background: linear-gradient(135deg, #ecfdf5, #f0fdfa); border: 1px solid #a7f3d0;
}
.sf-value-prop strong { font-size: 14.5px; color: #065f46; }
.sf-value-prop span { font-size: 12.5px; color: #047857; }
.sf-value-prop-inline { font-size: 12px; font-weight: 600; color: #047857; margin: -6px 0 10px; }

.sf-plan-card {
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, #F5F3FF, #F5F3FF); border: 1px solid #EDE9FE;
}
.sf-plan-card.is-empty { background: linear-gradient(135deg, #fef2f2, #fff7ed); border-color: #fecaca; }
.sf-plan-card-status { font-size: 13px; color: #4C1D95; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.sf-plan-card.is-empty .sf-plan-card-status { color: #991b1b; }
.sf-plan-card-detail { font-size: 11.5px; font-weight: 500; color: #3b5a9a; }
.sf-plan-card.is-empty .sf-plan-card-detail { color: #b45050; }
.sf-plan-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sf-flat-price { font-size: 20px; font-weight: 800; color: #7C3AED; margin: 4px 0 12px; }
.sf-qty-presets { display: flex; gap: 6px; margin-bottom: 8px; }
.sf-qty-preset {
  flex: 1; text-align: center; padding: 7px 4px; border-radius: 7px; border: 1px solid #d1d5db;
  background: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; color: #374151;
}
.sf-qty-preset:hover { border-color: #C4B5FD; }
.sf-qty-preset.active { background: #7C3AED; color: #fff; border-color: #7C3AED; }
.sf-buy-total { font-size: 15px; font-weight: 700; color: #111827; margin: 10px 0 4px; }
.sf-contact-note { font-size: 11.5px; color: #6b7280; margin: 14px 0 0; text-align: center; }
.sf-contact-note a { color: #7C3AED; }

.sf-grant-row { display: flex; align-items: center; gap: 6px; }
.sf-grant-input { width: 56px; padding: 4px 6px; font-size: 12px; }

.sf-admin-user-cell { display: flex; flex-direction: column; gap: 2px; }
.sf-admin-user-name { font-weight: 600; color: #111827; }
.sf-admin-user-sub { font-size: 11.5px; color: #6b7280; }

.sf-purchase-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.sf-purchase-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f1f3f6; font-size: 12.5px; }
.sf-purchase-row:last-child { border-bottom: none; }
.sf-purchase-row > span:first-child { flex: 1; font-weight: 500; }
.sf-purchase-date { color: #9ca3af; font-size: 11.5px; }

.sf-home-hero {
  background: linear-gradient(135deg, #5B21B6, #8B2FC9 55%, #C026D3);
  border-radius: 16px; padding: 28px 26px; margin-bottom: 20px; color: #fff;
  box-shadow: 0 8px 24px -8px rgba(147,51,234,0.5);
}
.sf-home-hero h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.sf-home-hero p { margin: 0 0 18px; font-size: 13.5px; color: rgba(255,255,255,0.85); }
.sf-home-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-hero-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.35); color: #fff;
  font-size: 13.5px; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
}
.sf-hero-btn:hover { background: rgba(255,255,255,0.24); transform: translateY(-1px); }
.sf-hero-btn:first-child { background: #fff; color: #6D28D9; border-color: transparent; }
.sf-hero-btn:first-child:hover { background: #F5F3FF; }
.sf-hero-btn .sf-icon { width: 16px; height: 16px; }

.sf-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.sf-kpi-card {
  background: #fff; border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sf-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(16,24,40,0.15); }
.sf-kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-kpi-icon .sf-icon { width: 22px; height: 22px; }
.sf-kpi-blue .sf-kpi-icon { background: #EDE9FE; color: #6D28D9; }
.sf-kpi-amber .sf-kpi-icon { background: #fef3c7; color: #b45309; }
.sf-kpi-green .sf-kpi-icon { background: #dcfce7; color: #15803d; }
.sf-kpi-text { display: flex; flex-direction: column; gap: 2px; }
.sf-kpi-value { font-size: 26px; font-weight: 800; color: #1E1033; letter-spacing: -0.02em; line-height: 1; }
.sf-kpi-label { font-size: 12px; color: #6b7280; font-weight: 600; }

.sf-home-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

.sf-cmp-panel { margin-top: 16px; }
.sf-cmp-panel h3 { text-transform: none; letter-spacing: normal; font-size: 15.5px; color: #111827; margin-bottom: 4px; }
.sf-cmp-subtitle { font-size: 12.5px; color: #6b7280; margin: 0 0 16px; }
.sf-cmp-table { overflow-x: auto; }
.sf-cmp-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #f1eefb; min-width: 560px; }
.sf-cmp-row:last-child { border-bottom: none; }
.sf-cmp-row.sf-cmp-head { color: #7c3aed; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #ece4fc; }
.sf-cmp-label { flex: 1.6; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-cmp-label strong { font-size: 13px; color: #111827; }
.sf-cmp-label span { font-size: 11.5px; color: #6b7280; line-height: 1.4; }
.sf-cmp-cell { flex: 1; text-align: center; font-size: 12.5px; color: #6b7280; }
.sf-cmp-cell-us { font-weight: 700; }
.sf-cmp-pricing { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f1eefb; }
.sf-cmp-pricing h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #7c3aed; font-weight: 800; }
.sf-cmp-savings { display: inline-block; background: #ecfdf5; color: #065f46; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; margin: 0 0 10px; }
.sf-cmp-price-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: #374151; }
.sf-cmp-price-row span:first-child { font-weight: 600; color: #111827; flex-shrink: 0; }
.sf-cmp-price-row span:last-child { text-align: right; }
.sf-cmp-price-us { background: var(--violet-50, #f5f3ff); border-radius: 8px; padding: 8px 10px; margin: 4px -10px 0; }
.sf-cmp-price-us span:first-child, .sf-cmp-price-us span:last-child { color: #3b0764; font-weight: 700; }
.sf-cmp-disclaimer { margin-top: 16px; font-size: 10.5px; color: #9ca3af; line-height: 1.5; }
.sf-home-panel { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); }
.sf-home-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sf-home-panel-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; color: #111827; }
.sf-home-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #f1f3f6; cursor: pointer; }
.sf-home-row:last-child { border-bottom: none; }
.sf-home-row:hover .sf-home-row-title { color: #7C3AED; }
.sf-home-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sf-home-row-title { font-size: 13.5px; font-weight: 600; color: #111827; transition: color 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-home-row-sub { font-size: 11.5px; color: #6b7280; display: flex; align-items: center; gap: 6px; }
.sf-home-row-progress { color: #6b7280; }
.sf-home-row-date { font-size: 11.5px; color: #9ca3af; flex-shrink: 0; }
.sf-empty-sm { padding: 30px 16px; box-shadow: none; }

.sf-ticket-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.sf-ticket-card { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06); }
.sf-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.sf-ticket-message { white-space: pre-wrap; font-size: 13px; color: #374151; background: #f9fafb; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.sf-ticket-reply-box { white-space: pre-wrap; font-size: 12.5px; color: #4C1D95; background: #F5F3FF; border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; border-left: 3px solid #7C3AED; }
.sf-ticket-reply-textarea { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; font-family: inherit; resize: vertical; box-sizing: border-box; margin-bottom: 8px; }
.sf-ticket-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sf-ticket-thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sf-ticket-bubble { border-radius: 10px; padding: 9px 12px; font-size: 12.5px; max-width: 88%; }
.sf-ticket-bubble p { white-space: pre-wrap; margin: 3px 0 0; }
.sf-ticket-bubble-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; }
.sf-ticket-bubble-date { display: block; font-size: 10.5px; opacity: 0.6; margin-top: 4px; }
.sf-ticket-bubble-theirs { background: #f9fafb; color: #374151; align-self: flex-start; }
.sf-ticket-bubble-mine { background: #F5F3FF; color: #4C1D95; align-self: flex-end; }
.sf-ticket-rating { font-size: 13px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.sf-rate-stars { font-size: 26px; letter-spacing: 4px; }
.sf-rate-star { color: #d1d5db; cursor: pointer; transition: color 0.1s; }
.sf-rate-star:hover { color: #fbbf24; }
.sf-rate-star.active { color: #f59e0b; }

.sf-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.sf-stat-tile {
  background: #fff; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  display: flex; flex-direction: column; gap: 4px;
}
.sf-stat-value { font-size: 24px; font-weight: 800; color: #1E1033; letter-spacing: -0.02em; }
.sf-stat-label { font-size: 11.5px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

.sf-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 50; }
.sf-modal { background: #fff; border-radius: 14px; padding: 22px; width: 420px; max-width: 92vw; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }
.sf-modal h3 { margin-top: 0; font-size: 16px; }
.sf-modal-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.sf-modal-brand .sf-topbar-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.sf-modal-brand span { font-weight: 700; font-size: 14px; color: #1E1033; }
.sf-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.sf-tab { padding: 7px 14px; border-radius: 8px; background: #f1f3f6; cursor: pointer; font-size: 13px; font-weight: 500; transition: background 0.15s; }
.sf-tab.active { background: #7C3AED; color: #fff; }

/* Pestanas de "Administrar" (Manage), al estilo DocuSign: subrayado en vez
   de pildoras rellenas, para que se sienta como navegacion dentro de la
   misma seccion en vez de botones de accion. */
.sf-manage-tabs { display: flex; gap: 22px; border-bottom: 1px solid #e5e7eb; margin: 4px 0 18px; overflow-x: auto; }
.sf-manage-tab {
  padding: 9px 2px; font-size: 13.5px; font-weight: 600; color: #6b7280; cursor: pointer;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.sf-manage-tab:hover { color: #111827; }
.sf-manage-tab.active { color: #7C3AED; border-bottom-color: #7C3AED; }
.sf-sig-canvas { border: 1px solid #d1d5db; border-radius: 8px; width: 100%; height: 160px; touch-action: none; background: #fcfcfd; }
.sf-typed-input { width: 100%; padding: 11px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 22px; font-style: italic; }
.sf-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sf-error { color: #dc2626; font-size: 12.5px; margin-top: 8px; }
.sf-notice { color: #7C3AED; font-size: 12.5px; margin-top: 8px; }
.sf-sub-text { color: #6b7280; font-size: 13px; line-height: 1.5; }
.sf-verify-banner { background: #fffbeb; color: #92400e; font-size: 12.5px; padding: 8px 20px; text-align: center; border-bottom: 1px solid #fde68a; }
.sf-verify-banner .sf-link { color: #92400e; font-weight: 600; text-decoration: underline; margin-left: 4px; }

.sf-audit-list { font-size: 12.5px; }
.sf-audit-item { padding: 8px 0; border-bottom: 1px solid #f1f3f6; }
.sf-audit-item:last-child { border-bottom: none; }

#sf-status-actions { display: flex; align-items: center; gap: 14px; }
.sf-link-danger { color: #dc2626; }
.sf-link-danger:hover { color: #b91c1c; }
.sf-link-muted { color: #6b7280; }
.sf-link-muted:hover { color: #374151; }
.sf-confirm-text { font-size: 12.5px; color: #4b5563; margin-right: 6px; }
.sf-modal-message { font-size: 13px; color: #4b5563; line-height: 1.5; }
.sf-sig-signing-as { font-size: 12px; color: #6b7280; margin: -6px 0 12px; }

.sf-trash-warning {
  display: flex; align-items: center; gap: 10px; background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; font-size: 12.5px; padding: 11px 14px; border-radius: 9px; margin-bottom: 16px;
}
.sf-trash-expiry { color: #92400e; font-weight: 600; }
.sf-trash-expiry.sf-trash-expiry-soon { color: #b91c1c; }

@keyframes sf-field-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,0.55); }
  70% { box-shadow: 0 0 0 14px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}
.sf-field-box.sf-field-pulse { animation: sf-field-pulse 1s ease-out 2; }


/* Signing editor: reliable long-document scrolling + auto-field focus */
.sf-pdf-area {
  max-height: 72vh !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  scrollbar-gutter: stable;
  position: relative;
}
.sf-pdf-area .sf-page { touch-action: pan-y pinch-zoom; }
.sf-field-focus-pulse {
  box-shadow: 0 0 0 5px rgba(124,58,237,.18), 0 8px 22px rgba(76,29,149,.18) !important;
  animation: sfFieldPulse 1.2s ease-out 1;
}
@keyframes sfFieldPulse {
  0% { transform: scale(.97); }
  45% { transform: scale(1.025); }
  100% { transform: scale(1); }
}


/* External signing pointer/touch hardening */
.sf-pdf-area{height:72vh;max-height:72vh!important;min-height:520px;overflow:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;scrollbar-gutter:stable both-edges;}
.sf-pdf-area .sf-page{touch-action:pan-x pan-y pinch-zoom;}
.sf-field-box{touch-action:none;cursor:grab;}
.sf-field-box.sf-field-interacting{cursor:grabbing;z-index:8;box-shadow:0 8px 24px rgba(76,29,149,.22);}
.sf-field-box .sf-field-resize{touch-action:none;width:20px;height:20px;bottom:-9px;right:-9px;}
@media(max-width:860px){.sf-pdf-area{height:64vh;max-height:64vh!important;min-height:420px;}}


/* Corporate lifecycle dashboard home. Web-only: appended during the Railway build. */
.sf-home-hero.sf-home-hero-actions-only {
  min-height: 112px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.sf-home-hero.sf-home-hero-actions-only .sf-clm-trust-strip {
  display: none !important;
}
.sf-home-hero.sf-home-hero-actions-only .sf-home-hero-actions {
  width: 100%;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  gap: 14px;
}
.sf-home-hero.sf-home-hero-actions-only .sf-hero-btn {
  min-width: 220px;
  justify-content: center;
  padding: 13px 22px;
  font-size: 14px;
  border-radius: 11px;
}

.sf-dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.sf-dash-kpi {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #ebe7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(38, 22, 53, 0.055);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.sf-dash-kpi:hover {
  transform: translateY(-2px);
  border-color: #ded4eb;
  box-shadow: 0 10px 26px rgba(38, 22, 53, 0.09);
}
.sf-dash-kpi.is-static { cursor: default; }
.sf-dash-kpi.is-static:hover { transform: none; }
.sf-dash-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.sf-dash-kpi-icon .sf-icon { width: 22px; height: 22px; }
.sf-dash-kpi-icon.is-purple { background: #f0eaff; color: #6d28d9; }
.sf-dash-kpi-icon.is-blue { background: #e9f2ff; color: #2563eb; }
.sf-dash-kpi-icon.is-indigo { background: #eef0ff; color: #4f46e5; }
.sf-dash-kpi-icon.is-amber { background: #fff4df; color: #b45309; }
.sf-dash-kpi-icon.is-green { background: #e8f8ee; color: #15803d; }
.sf-dash-kpi-icon.is-teal { background: #e7f8f5; color: #0f766e; }
.sf-dash-kpi-icon.is-slate { background: #eef2f6; color: #475569; }
.sf-dash-kpi-value {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #22152f;
  margin-bottom: 5px;
}
.sf-dash-kpi-label { display: block; font-size: 12px; font-weight: 700; color: #665b70; }
.sf-dash-kpi-meta { display: block; margin-top: 4px; font-size: 10.5px; color: #92889b; font-weight: 600; }

.sf-dash-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.sf-dash-grid-primary { grid-template-columns: minmax(0, 1.75fr) minmax(300px, .8fr); }
.sf-dash-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-dash-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #ebe7f1;
  border-radius: 16px;
  padding: 19px 20px;
  box-shadow: 0 5px 18px rgba(38, 22, 53, 0.05);
}
.sf-dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.sf-dash-panel-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #24142f;
  text-transform: none;
  letter-spacing: normal;
}
.sf-dash-panel-head p { margin: 0; color: #8b8193; font-size: 11.5px; line-height: 1.4; }
.sf-dash-panel-total {
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f5f1fb;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 800;
}

.sf-dash-bars {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(6, minmax(40px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 4px 6px 0;
}
.sf-dash-bar-item {
  height: 100%;
  display: grid;
  grid-template-rows: 22px 1fr 24px;
  align-items: end;
  text-align: center;
}
.sf-dash-bar-number { font-size: 10.5px; font-weight: 750; color: #7b7083; align-self: center; }
.sf-dash-bar-track {
  height: 100%;
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid #ece7f1;
  background-image: linear-gradient(to top, rgba(123, 92, 160, .055) 1px, transparent 1px);
  background-size: 100% 25%;
}
.sf-dash-bar-fill {
  width: min(42px, 62%);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #9f67ec, #6d28d9);
  box-shadow: 0 5px 12px rgba(109, 40, 217, .18);
}
.sf-dash-bar-label { padding-top: 7px; font-size: 10.5px; color: #8d8396; text-transform: capitalize; }

.sf-dash-donut-layout {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 220px;
}
.sf-dash-donut {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(31, 20, 40, .03);
}
.sf-dash-donut::after {
  content: '';
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #f0ebf4;
}
.sf-dash-donut > div { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.sf-dash-donut strong { font-size: 25px; color: #271633; line-height: 1; }
.sf-dash-donut span { font-size: 9.5px; color: #92889a; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.sf-dash-legend { display: flex; flex-direction: column; gap: 11px; }
.sf-dash-legend > span { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; color: #6f6578; }
.sf-dash-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.sf-dash-legend i.is-draft { background: #7c3aed; }
.sf-dash-legend i.is-sent { background: #2563eb; }
.sf-dash-legend i.is-completed { background: #16a34a; }
.sf-dash-legend i.is-other { background: #cbd5e1; }
.sf-dash-legend strong { color: #2c1b38; font-size: 12px; }

.sf-dash-resource-list { display: flex; flex-direction: column; gap: 10px; }
.sf-dash-resource-row {
  border: 1px solid #eee9f2;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fdfcfe;
}
.sf-dash-resource-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sf-dash-resource-top span { font-size: 11.5px; color: #665c6f; font-weight: 700; }
.sf-dash-resource-top strong { color: #261633; font-size: 15px; }
.sf-dash-resource-balance { display: flex; align-items: center; gap: 7px; color: #8c8194; }
.sf-dash-resource-balance > span { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; background: #f1ecf9; color: #7c3aed; }
.sf-dash-resource-balance .sf-icon { width: 13px; height: 13px; }
.sf-dash-resource-row small { font-size: 10px; color: #948a9c; font-weight: 600; }
.sf-dash-progress { height: 7px; background: #eee9f3; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.sf-dash-progress span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #b832d7); }

.sf-dash-activity-list { display: flex; flex-direction: column; }
.sf-dash-activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #f1edf4;
}
.sf-dash-activity-row:last-child { border-bottom: none; }
.sf-dash-activity-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #eef4ff; color: #2563eb; }
.sf-dash-activity-icon.is-contract { background: #f2ecff; color: #7c3aed; }
.sf-dash-activity-icon .sf-icon { width: 14px; height: 14px; }
.sf-dash-activity-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-dash-activity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #2c1a38; }
.sf-dash-activity-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #918798; }
.sf-dash-activity-row time { font-size: 9.5px; color: #9b91a2; white-space: nowrap; }

@media (max-width: 1320px) {
  .sf-dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-dash-grid-primary, .sf-dash-grid-secondary { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sf-dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-dash-grid-primary, .sf-dash-grid-secondary { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sf-home-hero.sf-home-hero-actions-only { min-height: 0; padding: 18px; }
  .sf-home-hero.sf-home-hero-actions-only .sf-home-hero-actions { flex-direction: column; }
  .sf-home-hero.sf-home-hero-actions-only .sf-hero-btn { min-width: 0; width: 100%; }
  .sf-dash-kpi-grid { grid-template-columns: 1fr; }
  .sf-dash-bars { gap: 5px; }
  .sf-dash-bar-fill { width: 60%; }
  .sf-dash-donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .sf-dash-legend { width: 100%; }
}
