/* ==========================================================================
   Acompanha SEI — Corporate Institutional Design System
   Matches Screenshot Reference Pixel-for-Pixel
   ========================================================================== */

:root {
  /* Colors */
  --bg-body: #f0f4f8;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-dark: #0f172a;
  
  --nav-bg: #011b33;
  --nav-active: #003666;
  --nav-text: #cbd5e1;
  --nav-text-active: #ffffff;
  
  --primary: #0a5647;
  --primary-hover: #0e6b58;
  --primary-light: #e6f4f1;
  
  --blue: #1d72b8;
  --purple: #6366f1;
  --red: #d32f2f;
  --orange: #ea580c;
  --green: #059669;
  
  --border: #e2e8f0;
  --border-light: #edf2f7;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 1px 4px rgba(15, 23, 42, 0.06);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

/* ==========================================================================
   Header / Navigation Bar (Dark Navy Theme)
   ========================================================================== */
.app-bar {
  width: 100%;
  background-color: var(--nav-bg);
  color: #ffffff;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-bar-inner {
  width: 100%;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 28px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.brand-logo-box {
  width: 32px;
  height: 32px;
  background-color: #0b5b48;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-link.current {
  background-color: var(--nav-active);
  color: var(--nav-text-active);
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
}

.status-divider {
  color: #64748b;
}

.icon-nav-btn {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  padding: 4px;
}

.icon-nav-btn:hover {
  color: #ffffff;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -5px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  line-height: 1.2;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #1e40af;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.user-role {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.2;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.btn-logout svg {
  stroke-width: 2.2;
}

/* ==========================================================================
   Workspace Layout (Full-Width Fluid)
   ========================================================================== */
.workspace {
  width: 100%;
  padding: 24px 28px 48px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.head-title-wrap h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.head-title-wrap p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #0b5b48;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #0e6e58;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-dark);
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

/* ==========================================================================
   5 Metrics Cards in a Row
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}

.metric-card.active {
  border-color: #0b5b48;
  background-color: #ffffff;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffffff;
}

.bg-blue { background-color: #1d72b8; }
.bg-purple { background-color: #7c3aed; }
.bg-red { background-color: #dc2626; }
.bg-orange { background-color: #ea580c; }
.bg-green { background-color: #059669; }

.metric-content {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin: 1px 0;
}

.metric-sub {
  font-size: 11px;
  color: var(--text-light);
}

.text-danger-val {
  color: #dc2626 !important;
}

/* ==========================================================================
   Inline Process Form
   ========================================================================== */
.inline-form {
  background: #ffffff;
  border: 1px solid #0b5b48;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.form-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.form-heading p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.close-form-btn {
  background: transparent;
  border: 0;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.3fr 1.2fr 0.8fr 0.8fr;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

input, select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  background: #ffffff;
  outline: none;
}

input:focus, select:focus {
  border-color: #0b5b48;
}

.input-suffix {
  display: flex;
}

.input-suffix input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  width: 100%;
}

.input-suffix span {
  display: grid;
  place-items: center;
  padding: 0 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.field-hint {
  font-size: 10.5px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.form-status-feedback {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
}

/* ==========================================================================
   Main Split Dashboard (Meus Processos + Detalhe)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (min-width: 1600px) {
  .dashboard-grid {
    grid-template-columns: 410px minmax(0, 1fr);
  }
}

/* Left Column: Process Pane */
.process-pane {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.pane-heading {
  padding: 16px 18px 12px;
}

.pane-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.last-scan-text {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--text-light);
}

.filter-controls {
  padding: 0 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 34px;
  padding-left: 32px;
  padding-right: 32px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.filter-icon-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pill-tab {
  background-color: #f1f5f9;
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.pill-tab:hover {
  background-color: #e2e8f0;
  color: var(--text-main);
}

.pill-tab.active {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
}

.pill-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: inherit;
}

.pill-badge.red-badge {
  color: #dc2626;
}

/* Process Items List */
.process-list {
  max-height: calc(100vh - 350px);
  min-height: 480px;
  overflow-y: auto;
}

.process-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-light);
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color 0.1s ease;
}

.process-row:hover {
  background-color: #f8fafc;
}

.process-row.selected {
  background-color: #f0f7f5;
  border-left: 3px solid #0b5b48;
}

.process-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.process-number {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.star-btn {
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.star-btn.starred {
  color: #f59e0b;
}

.process-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.marker-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  background-color: #fff7ed;
  color: #c2410c;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.marker-chip::before {
  content: '•';
  font-size: 14px;
  line-height: 0;
  color: #f97316;
}

.process-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-light);
}

.status-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.status-dot-wrap.red { color: #dc2626; }
.status-dot-wrap.orange { color: #ea580c; }
.status-dot-wrap.green { color: #059669; }

.status-dot-wrap::before {
  content: '•';
  font-size: 14px;
}

.unit-consult-meta {
  text-align: right;
  font-size: 10.5px;
}

/* ==========================================================================
   Right Column: Detail Pane
   ========================================================================== */
.detail-pane {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.empty-detail {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
}

.empty-detail strong {
  font-size: 16px;
  color: var(--text-dark);
}

/* Detail Header */
.detail-header-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.detail-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.protocol-star-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-protocol {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.detail-subtitle {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-actions-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-open-sei {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0b5b48;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
}

.btn-open-sei:hover {
  text-decoration: underline;
}

.btn-dots-menu {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

/* 8-Grid Key Facts */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.fact-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
}

.fact-icon {
  color: #0284c7;
  margin-top: 2px;
}

.fact-cell span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2px;
}

.fact-cell strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.fact-cell .status-open {
  color: #059669;
}

.link-add-whatsapp {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  text-decoration: none;
  margin-top: 2px;
}

/* Middle Dual Cards */
.middle-split-cards {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 14px;
}

.sub-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sub-card-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.link-complete-timeline {
  font-size: 11.5px;
  font-weight: 700;
  color: #1d72b8;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.doc-box-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.doc-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background-color: #e0f2fe;
  color: #0284c7;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.doc-meta-right strong {
  display: block;
  font-size: 13px;
  color: var(--text-dark);
}

.doc-meta-right small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-open-doc {
  width: fit-content;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
}

/* Horizontal Timeline Stepper */
.mini-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin-top: 10px;
}

.mini-stepper::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 20px;
  right: 20px;
  height: 2px;
  background-color: #e2e8f0;
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 80px;
}

.step-date {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
}

.step-time {
  font-size: 9.5px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.step-icon-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: grid;
  place-items: center;
  font-size: 10px;
  margin-bottom: 6px;
}

.step-icon-circle.c-blue { border-color: #1d72b8; color: #1d72b8; }
.step-icon-circle.c-purple { border-color: #7c3aed; color: #7c3aed; }
.step-icon-circle.c-green { border-color: #059669; color: #059669; }
.step-icon-circle.c-orange { border-color: #ea580c; color: #ea580c; }

.step-label {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Bottom Alerts Section */
.alerts-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.alerts-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alerts-title-left h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.alert-counter-badge {
  background-color: #dc2626;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.alerts-count-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.refresh-mini-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  padding: 2px;
}

.alert-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}

.alert-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #dc2626;
  margin-top: 5px;
}

.alert-heading-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-heading-row strong {
  font-size: 13px;
  color: var(--text-dark);
}

.tag-overdue-red {
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.alert-desc-text {
  margin: 2px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.alert-dates-meta {
  font-size: 11px;
  color: var(--text-light);
}

.alert-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-open-alert-doc {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
}

.btn-resolve-alert {
  padding: 6px 14px;
  border-radius: 6px;
  border: 0;
  background-color: #0b5b48;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.btn-resolve-alert:hover {
  background-color: #0e6e58;
}

/* ==========================================================================
   Management Details
   ========================================================================== */
.management {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.management-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.management-card summary {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0b5b48;
}

.management-body {
  padding: 14px 18px 20px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}

.responsible-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr 1.2fr auto;
  gap: 10px;
  align-items: end;
}

.responsible-list, .message-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.responsible-list th, .responsible-list td,
.message-table th, .message-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}

.responsible-list th, .message-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-action {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.state-label {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.state-label.enviada { background: #dcfce7; color: #15803d; }
.state-label.bloqueada, .state-label.erro { background: #fee2e2; color: #b91c1c; }
.state-label.simulada { background: #fef3c7; color: #b45309; }

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 0 4px;
}

/* ==========================================================================
   Timeline Dialog (Modal)
   ========================================================================== */
.timeline-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: min(800px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.timeline-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.timeline-dialog-head {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
}

.dialog-context {
  font-size: 11px;
  font-weight: 700;
  color: #0b5b48;
  text-transform: uppercase;
}

.timeline-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.timeline-dialog-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.close-dialog-btn {
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
}

.timeline-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
}

.timeline-summary > div {
  padding: 12px 18px;
  border-right: 1px solid var(--border-light);
}

.timeline-summary strong {
  font-size: 15px;
  display: block;
}

.timeline-summary span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.timeline-filter-bar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-light);
}

.timeline-filter-bar input {
  width: 100%;
}

.document-timeline {
  list-style: none;
  margin: 0;
  padding: 20px;
}

.document-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 16px 130px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
}

.document-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: #0b5b48;
  z-index: 2;
}

.document-timeline article {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px 14px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  padding: 10px 16px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Notifications Center Modal
   ========================================================================== */
.notifications-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow: hidden;
}

.notifications-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.notif-dialog-head {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.notif-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #fee2e2;
  color: #dc2626;
  display: grid;
  place-items: center;
}

.notif-title-group h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.notif-title-group p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.notif-filter-bar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-light);
}

.notif-filter-bar input {
  width: 100%;
}

.notif-list-container {
  max-height: 520px;
  overflow-y: auto;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-card-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.12s ease;
}

.notif-card-item:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.notif-card-item.overdue {
  border-left: 4px solid #dc2626;
  background-color: #fffbfa;
}

.notif-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.notif-proc-number {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

.notif-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.notif-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.notif-card-meta {
  font-size: 11px;
  color: var(--text-light);
}

.notif-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

.btn-notif-view {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  white-space: nowrap;
}

.btn-notif-view:hover {
  background-color: #f1f5f9;
}

