:root {
  --verde: #2d6a4f;
  --verde-claro: #52b788;
  --verde-suave: #d8f3dc;
  --crema: #fefae0;
  --cafe: #7c4700;
  --naranja: #e76f51;
  --gris: #6b7280;
  --blanco: #ffffff;
  --sombra: 0 4px 24px rgba(44,106,79,0.10);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  min-height: 100vh;
  color: #1a1a1a;
}

/* HEADER */
header {
  background: var(--verde);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.7rem;
  color: var(--verde-suave);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--naranja);
  font-style: italic;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover, .nav-btn.active {
  background: var(--verde-claro);
  border-color: var(--verde-claro);
}

/* LAYOUT */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
  border-radius: 20px;
  padding: 48px 40px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '🐾';
  position: absolute;
  font-size: 120px;
  right: 30px;
  top: 10px;
  opacity: 0.12;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 480px;
}

.hero-btn {
  margin-top: 24px;
  background: white;
  color: var(--verde);
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* STATS */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  font-size: 2.2rem;
}

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--verde);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--gris);
  margin-top: 2px;
}

/* TABLE */
.table-card {
  background: white;
  border-radius: 18px;
  box-shadow: var(--sombra);
  overflow: hidden;
  margin-top: 28px;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.table-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--verde);
}

.search-input {
  border: 1.5px solid #e5e7eb;
  border-radius: 50px;
  padding: 8px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  width: 220px;
  transition: border 0.2s;
}

.search-input:focus {
  border-color: var(--verde-claro);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f9fafb;
  padding: 12px 18px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gris);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-top: 1px solid #f0f0f0;
}

tr:hover td {
  background: #f9fffe;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
}

.badge-alta {
  background: #fee2e2;
  color: #dc2626;
}

.badge-media {
  background: #fef3c7;
  color: #d97706;
}

.badge-baja {
  background: var(--verde-suave);
  color: var(--verde);
}

.badge-conf {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-pend {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-action {
  background: var(--verde-suave);
  color: var(--verde);
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 4px;
}

.btn-action:hover {
  background: #b7e4c7;
}

.btn-action.danger {
  background: #fee2e2;
  color: #dc2626;
}

.btn-action.danger:hover {
  background: #fecaca;
}

/* FORM */
.form-card {
  background: white;
  border-radius: 20px;
  box-shadow: var(--sombra);
  padding: 36px 40px;
  max-width: 620px;
  margin: 0 auto;
}

.form-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--verde);
  margin-bottom: 8px;
}

.form-subtitle {
  color: var(--gris);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.84rem;
  font-weight: 500;
  color: #374151;
}

input, select, textarea {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  background: #fafafa;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--verde-claro);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.12);
  background: white;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* DMN BOX */
.dmn-box {
  background: var(--verde-suave);
  border-left: 4px solid var(--verde-claro);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.88rem;
  color: var(--verde);
  display: none;
}

.dmn-box.show {
  display: block;
}

.dmn-box strong {
  font-size: 0.95rem;
}

.submit-btn {
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
  color: white;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(44,106,79,0.25);
}

.submit-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* FLUJO */
.flow-card {
  background: white;
  border-radius: 18px;
  box-shadow: var(--sombra);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.flow-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--verde);
  margin-bottom: 18px;
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.flow-step:last-child {
  border-bottom: none;
}

.step-num {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--verde);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-num.decision {
  background: var(--naranja);
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--gris);
}

.step-tag {
  display: inline-block;
  font-size: 0.72rem;
  background: #f3f4f6;
  color: var(--gris);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.step-tag.bpmn {
  background: #dbeafe;
  color: #1d4ed8;
}

.step-tag.dmn {
  background: var(--verde-suave);
  color: var(--verde);
}

/* DMN TABLE */
.dmn-table-card {
  background: white;
  border-radius: 18px;
  box-shadow: var(--sombra);
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.dmn-table-card table {
  min-width: 500px;
}

.dmn-table-card th {
  background: var(--verde);
  color: white;
}

.dmn-table-card td {
  vertical-align: middle;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--verde);
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* SECTION TITLE */
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--verde-claro);
  font-weight: 600;
  margin-bottom: 4px;
}

.section-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--verde);
  margin-bottom: 24px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 30px 22px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .form-card {
    padding: 24px 18px;
  }
}