/* CARDS */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header-titles h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--brand-black);
  letter-spacing: -0.015em;
}

.card-header-titles p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.card-body { padding: 24px; }

.section-divider-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-emerald);
  margin: 18px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-divider-title::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--brand-emerald);
  border-radius: 2px;
}

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.four-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

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

label { font-size: 13px; font-weight: 700; color: var(--text-main); }

.input-control {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border-dark);
  padding: 10px 13px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.input-control:focus {
  border-color: var(--brand-emerald);
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.12);
}

.input-control[readonly] {
  background: #f8fafc;
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: #e2e8f0;
}

textarea.input-control {
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}

.help-text { font-size: 11.5px; color: var(--text-secondary); }

.segment-options { display: flex; gap: 8px; }

.segment-item {
  flex: 1;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
}

.segment-item:hover { background: var(--brand-light); }

.segment-item.active {
  border-color: var(--brand-emerald);
  background: var(--brand-light);
  color: var(--brand-emerald);
  box-shadow: 0 1px 2px rgba(6, 78, 59, 0.08);
}

.segment-item input[type="radio"] { accent-color: var(--brand-emerald); }

.ics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 5px;
}

.ics-item {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ics-item:hover { background: var(--brand-light); border-color: var(--border-emerald); }
.ics-item.active-ics { background: var(--brand-light); border-color: var(--brand-accent); color: var(--brand-emerald); font-weight: 600; }
.ics-item input[type="checkbox"] { accent-color: var(--brand-emerald); }

.btn {
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-dark { background: var(--brand-emerald); color: #ffffff; }
.btn-dark:hover { background: var(--brand-emerald-hover); }
.btn-light { background: #ffffff; border-color: var(--border-dark); color: var(--text-main); }
.btn-light:hover { background: var(--brand-light); color: var(--brand-emerald); border-color: var(--border-emerald); }

.table-wrapper {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

table.data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-main);
}

table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--brand-light); }

.badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid;
  display: inline-block;
}

.badge-amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.badge-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.badge-emerald { background: var(--brand-light); border-color: var(--border-emerald); color: var(--brand-emerald); }
.badge-gray { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }

.banner-readonly {
  background: var(--brand-light);
  border: 1px solid var(--border-emerald);
  border-left: 4px solid var(--brand-emerald);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.banner-col span {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-emerald);
  display: block;
}

.banner-col strong {
  font-size: 12.5px;
  color: var(--brand-black);
  display: block;
  margin-top: 2px;
}

.tech-box {
  background: #fafafa;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 14px 16px;
}

.tech-box h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-black);
  margin-bottom: 5px;
}


.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 44, 34, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal-card {
  background: #ffffff;
  border-radius: 10px;
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  padding: 22px;
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.gitflow-card {
  background: #022c22;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(110, 231, 183, 0.25);
}

.gitflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.gitflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11.5px;
}

.gitflow-item span {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.gitflow-item code {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 6px;
  border-radius: 4px;
  color: #6ee7b7;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-light);
  border: 1px solid var(--border-emerald);
  color: var(--brand-emerald);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* STEPPER ITIL v4 (6 FASES) */
.itil-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 10px 0 14px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.itil-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 4px 2px;
  opacity: 0.45;
}

.itil-step.done,
.itil-step.current {
  opacity: 1;
}

.itil-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  background: #cbd5e1;
  color: #334155;
  margin-bottom: 4px;
}

.itil-step.done .itil-step-num {
  background: #064e3b;
  color: #ffffff;
}

.itil-step.current .itil-step-num {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.itil-step.rejected .itil-step-num {
  background: #dc2626;
  color: #ffffff;
}

.itil-step-title {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-black);
  line-height: 1.15;
}

.itil-step-sub {
  font-size: 8.5px;
  color: var(--text-muted);
  margin-top: 1px;
  line-height: 1.15;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-purple {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-teal {
  background: #ccfbf1;
  color: #115e59;
  border: 1px solid #99f6e4;
}

/* WIZARD POR PASOS PARA FORMULARIOS */
.wizard-steps-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.wizard-step-tab:hover {
  background: #ffffff;
  border-color: var(--border);
}

.wizard-step-tab.active {
  background: #ffffff;
  border-color: var(--brand-emerald);
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.08);
}

.wizard-step-tab.completed {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.wizard-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wizard-step-tab.active .wizard-step-num {
  background: var(--brand-emerald);
  color: #ffffff;
}

.wizard-step-tab.completed .wizard-step-num {
  background: #059669;
  color: #ffffff;
}

.wizard-step-info strong {
  display: block;
  font-size: 12px;
  color: var(--brand-black);
  line-height: 1.25;
}

.wizard-step-info span {
  display: block;
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.wizard-progress-wrap {
  margin-bottom: 18px;
}

.wizard-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.wizard-progress-track {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #064e3b 0%, #10b981 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.sso-identity-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.sso-identity-item label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 2px;
}

.sso-identity-item input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-black);
  outline: none;
  padding: 0;
}

.wizard-step-pane {
  display: none;
  animation: fadeInWizard 0.2s ease-out;
}

.wizard-step-pane.active {
  display: block;
}

@keyframes fadeInWizard {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pills-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  background: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill-btn:hover {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
}

.filter-pill-btn.active {
  background: var(--brand-emerald);
  border-color: var(--brand-emerald);
  color: #ffffff;
}

.filter-pill-btn span {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(15, 23, 42, 0.08);
  padding: 1px 6px;
  border-radius: 999px;
}

.filter-pill-btn.active span {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

@media (max-width: 768px) {
  .two-cols, .three-cols, .four-cols, .ics-grid, .sso-identity-strip {
    grid-template-columns: 1fr;
  }
  .segment-options {
    flex-direction: column;
  }
}
