/* =========================================================
   BASE / PALETA / FUNDAMENTOS — versão sóbria
   ========================================================= */
   * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  /*TEXTO DO FINANCIALS*/
  .text-green-700 { color: #047857; }
  .text-red-700   { color: #b91c1c; }
  
  
  :root {
    /* ---- Paleta principal ---- */
    --blue-900: #0a1f44;
    --blue-800: #0f2a5a;
    --blue-700: #1e3a8a;
    --blue-600: #2f4eb2;
    --blue-500: #3b82f6;
    --blue-300: #60a5fa;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #fff;
    --bg: #f8fafc;
  
    --radius: 14px;
    --shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.3);
  }
  
  /* ---------------------------------------------------------
        Tipografia
     ---------------------------------------------------------- */
  @font-face {
    font-family: 'Azonix';
    src: url('assets/Azonix.otf') format('opentype');
    font-weight: 400;
  }
  body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--slate-800);
    line-height: 1.6;
  }
  
  /* =========================================================
        NAVBAR — Mantida do design original
        ========================================================= */
  .nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 42, 90, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
  }
  
  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eaf2ff;
    text-decoration: none;
    font-family: 'Azonix', 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.4px;
  }
  .brand img {
    height: 42px;
    width: auto;
  }
  
  .nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
  }
  .nav a {
    color: #eaf2ff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
  }
  .nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--blue-500);
    transition: width 0.25s;
  }
  .nav a:hover::after {
    width: 100%;
  }
  
  /* Botão tipo de usuário */
  .user-type-btn {
    background: var(--blue-300);
    color: var(--blue-900);
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .user-type-btn:hover {
    background: var(--blue-500);
    color: white;
  }
  
  /* =========================================================
        BOTÕES — sem gradientes, visual flat e limpo
        ========================================================= */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--slate-300);
    background: var(--white);
    color: var(--slate-800);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
  }
  .btn:hover {
    background: var(--slate-200);
    transform: translateY(-1px);
  }
  
  .btn-primary {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: white;
  }
  .btn-primary:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
  }
  
  .btn-light {
    background: var(--white);
    border-color: var(--slate-200);
    color: var(--slate-800);
  }
  
  .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
  }
  .btn-danger:hover {
    background: #dc2626;
  }
  
  /* =========================================================
        CARDS E SEÇÕES
        ========================================================= */
  .card,
  .softwrap,
  .software-detail,
  .impact-card,
  .about-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
  }
  .card .icon,
  .about-icon,
  .impact-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--blue-500);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .software-header {
    background: white;
    border-bottom: 1px solid var(--slate-200);
    padding: 32px;
  }
  
  /* =========================================================
        FORMULÁRIOS
        ========================================================= */
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-group label,
  .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select,
  select {
    width: 100%;
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--slate-800);
    transition: all 0.2s;
    font-family: inherit;
  }
  
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus,
  select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
  
  .form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
  }
  
  .form-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* =========================================================
        MODAL - ESTILO "CREATE NEW PROJECT" CENTRALIZADO
        ========================================================= */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
  }
  
  .modal-overlay.show {
    display: flex;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  .modal {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(30px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  /* Modal Header */
  .modal-header {
    padding: 20px 28px;
    background: var(--blue-700, #1E40AF);
    color: #fff;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  
  .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
  }
  
  .modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: white;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  /* Modal Body */
  .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
  }
  
  /* Modal Footer */
  .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--slate-200);
    background: var(--slate-100);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
  }
  
  /* =========================================================
        FOOTER
        ========================================================= */
  footer {
    background: #1e293b;
    color: #eaf2ff;
    padding: 60px 0 30px;
  }
  .footer-title {
    color: white;
    font-size: clamp(28px, 3vw, 40px);
  }
  .footer-accent {
    color: var(--blue-300);
  }
  .footer-badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-300);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
  }
  
  /* Largura padrão do conteúdo */
  :root {
    --page-max-width: 2400px;
  }
  
  .container {
    width: min(95%, var(--page-max-width));
    margin-inline: auto;
  }
  
  footer .contact-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(10px);
  }
  footer .form-group input,
  footer .form-group textarea {
    background: white;
    color: var(--slate-800);
    border: 1px solid var(--slate-300);
  }
  
  /* =========================================================
        WBS / GANTT
        ========================================================= */
  #wbs .panel {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  #wbsTableContainer {
    flex: 1;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
  }
  
  #wbsHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
  }
  
  .gantt-bar-row {
    height: 42px;
    position: relative;
    border-bottom: 1px solid var(--slate-100);
  }
  
  .gantt-bar-row::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 21px;
    height: 1px;
    background: var(--slate-200);
  }
  
  .gantt-bar {
    position: absolute;
    height: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .gantt-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .gantt-bar.planned {
    top: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
  }
  
  .gantt-bar.actual {
    top: 26px;
    background: linear-gradient(135deg, #10b981, #059669);
  }
  
  .gantt-bar.actual.delayed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
  }
  
  .gantt-task-item {
    height: 42px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--slate-100);
    padding: 0;
  }
  
  .gantt-timeline-header,
  .gantt-timeline {
    position: relative;
    overflow: hidden;
  }
  
  .gantt-timeline-inner {
    position: relative;
    height: 100%;
  }
  
  .gantt-timeline-label,
  .gantt-timeline-column {
    display: inline-block;
    height: 100%;
    vertical-align: top;
    border-right: 1px solid var(--slate-200);
  }
  
  /* =========================================================
        SETUP - TABLES E SECTIONS
        ========================================================= */
  .order-chip {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 8px;
    font-size: 11px;
    line-height: 1;
    border-radius: 8px;
    background: #eef2ff;
    color: #374151;
    border: 1px solid #e5e7eb;
    font-weight: 600;
  }
  
  .setup-section {
    margin-bottom: 32px;
  }
  
  .setup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }
  
  .setup-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
  }
  
  .setup-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .setup-table th,
  .setup-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #334155;
    text-align: left;
  }
  
  .setup-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--slate-600);
  }
  
  .setup-table tr + tr {
    border-top: 1px solid #e2e8f0;
  }
  
  .setup-table tbody tr:hover {
    background: #f8fafc;
  }
  
  /* Collapsible Groups */
  .collapsible-group {
    border: 1px solid #e7eef9;
    border-radius: 14px;
    margin: 16px 0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
  }
  
  .collapsible-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  .collapsible-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    background: #f7faff;
    transition: all 0.2s;
    user-select: none;
  }
  
  .collapsible-header:hover {
    background: #eef5ff;
  }
  
  .collapsible-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--slate-900);
    flex: 1;
  }
  
  .collapsible-count {
    margin-left: auto;
    font-size: 12px;
    background: #e9f0ff;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--blue-700);
  }
  
  .collapsible-icon {
    transition: transform 0.2s;
    font-size: 20px;
    color: var(--slate-500);
  }
  
  .collapsible-icon.open {
    transform: rotate(180deg);
  }
  
  .collapsible-body {
    display: none;
    padding: 8px 18px 16px;
  }
  
  .collapsible-body.show {
    display: block;
    animation: slideDown 0.2s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .config-list {
    margin-bottom: 12px;
  }
  
  .config-list .config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed #eef3fb;
    transition: all 0.2s;
  }
  
  .config-item:hover {
    background: #f8fafc;
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 8px;
  }
  
  .config-item:last-child {
    border-bottom: none;
  }
  
  .config-item-main {
    flex: 1;
  }
  
  .config-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--slate-900);
    margin-bottom: 4px;
  }
  
  .config-item-desc {
    font-size: 13px;
    color: var(--slate-600);
  }
  
  .config-item-actions {
    display: flex;
    gap: 6px;
  }
  
  .sub-item-number {
    display: inline-block;
    width: 32px;
    text-align: center;
    margin-right: 8px;
    background: #eef5ff;
    border-radius: 8px;
    font-weight: 700;
    padding: 2px 0;
    font-size: 12px;
    color: var(--blue-700);
  }
  
  .group-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eef3fb;
  }
  
  /* Botões pequenos */
  .btn-sm {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--blue-500);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
  }
  
  .btn-sm:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
  }
  
  .btn-sm.ghost {
    background: #eef3ff;
    color: var(--slate-800);
    border: 1px solid #dde7ff;
  }
  
  .btn-sm.ghost:hover {
    background: #dde7ff;
  }
  
  .btn-sm.danger {
    background: #ef4444;
  }
  
  .btn-sm.danger:hover {
    background: #dc2626;
  }
  
  /* Icon buttons */
  .icon-btn {
    border: 1px solid #e7eef9;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--slate-600);
  }
  
  .icon-btn:hover {
    background: #f8fafc;
    border-color: var(--blue-300);
    color: var(--blue-600);
    transform: translateY(-1px);
  }
  
  /* Badges */
  .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  
  .badge-active {
    background: #d8f5df;
    color: #137a2a;
    border: 1px solid #a7e9b4;
  }
  
  .badge-inactive {
    background: #ffe8e8;
    color: #a63a3a;
    border: 1px solid #ffb8b8;
  }
  
  /* Empty state */
  .empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--slate-500);
    font-size: 14px;
  }
  
  /* TABS */
  .nav-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--slate-200);
    margin-bottom: 24px;
    overflow-x: auto;
  }
  
  .tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--slate-600);
    transition: all 0.2s;
    white-space: nowrap;
  }
  
  .tab-btn:hover {
    color: var(--blue-600);
    background: var(--slate-100);
  }
  
  .tab-btn.active {
    color: var(--blue-600);
    border-bottom-color: var(--blue-600);
    background: #f0f7ff;
  }
  
  .tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
  }
  
  .tab-content.active {
    display: block;
  }
  
  /* =========================================================
        RESPONSIVO
        ========================================================= */
  @media (max-width: 960px) {
    .nav-inner {
      flex-direction: column;
      gap: 12px;
    }
    .card,
    .softwrap {
      padding: 18px;
    }
    .modal {
      max-width: 95%;
    }
    .form-row2 {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 640px) {
    .modal-header {
      padding: 16px 20px;
    }
    .modal-body {
      padding: 20px;
    }
    .modal-title {
      font-size: 18px;
    }
  }

  /* ---------- Toolbar / Header dentro do modal ---------- */
.risk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.risk-toolbar h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

/* ---------- Wrapper da tabela---------- */
.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.08);
  border: 1px solid #e5e7eb;
}

/* ---------- Tabela ---------- */
.risk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.risk-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.risk-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}
.risk-table tbody tr:hover {
  background: #f9fbff;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #f1f5f9;
}

/* ---------- Ações ---------- */
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.btn-ghost {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { background: #eef2f7; }

/* ---------- Botão principal ---------- */
.btn-primary {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #1677ff;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(.95); }