header, .site-header, .top-bar, .navbar {
  width: 100% !important;
  max-width: 100% !important;
}
body {
  margin: 0;
  background-color: #f0f4f8;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  /* Evita: display: flex; justify-content: center; align-items: flex-start; */
}


.navbar .menu-container {
  display: flex;
  gap: 20px;                 /* espacio entre enlaces del menú */
}

.navbar .username {
  margin-left: 900px;         /* empuja username a la derecha */
  color: #fff;
  font-weight: bold;
  padding: 0 10px;
}

.navbar .logout {
  margin-left: 15px;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
}


#opoModal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Fondo semi-transparente */
}

#opoModal .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
}

/* Main page background (safe scoped selector) */
.budget-page {
  background-color: #f4f7fa; /* very light background similar to your screenshot */
  padding: 30px 0; /* top/bottom spacing around the white card */
  box-sizing: border-box;
}

/* Keep the site .container untouched; style the container *inside* .budget-page only */
.budget-page .container {
  width: 100%;
  padding: 0 28px; /* breathing room left/right so card doesn't touch edge */
  box-sizing: border-box;
}

/* The white card with the form - limited width and centered */
.budget-page #modContainer.content-container {
  background: #fff;
  border-radius: 8px;
  padding: 32px 42px;
  box-shadow: 0 6px 20px rgba(18, 35, 49, 0.06);
  width: 100%;
  max-width: 1200px; /* control the maximum width here */
  margin: 0 auto; /* center horizontally */
  box-sizing: border-box;
}

/* Headline */
.budget-page #modContainer h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
}

/* Form rows: keep label width reasonable and inputs flexible */
.budget-page .form-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.budget-page .form-group label {
  flex: 0 0 170px; /* fixed label column width */
  font-weight: 600;
}

.budget-page .form-group input,
.budget-page .form-group select,
.budget-page .form-group textarea {
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Budget code small input + button */
.budget-page .budget-code-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.budget-page .budget-code-group .input-narrow {
  max-width: 180px;
}

.budget-page .btn-select-code {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #c8defd;
  color: #1b6fe0;
  border-radius: 6px;
}

/* Monthly distribution table: allow horizontal scroll without stretching the page */
.budget-page .table-container {
  overflow-x: auto;
  padding-bottom: 6px;
  margin-top: 10px;
}

.budget-page .budget-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px; /* keep columns from collapsing; will cause table to scroll on small screens */
}

.budget-page .budget-table th,
.budget-page .budget-table td {
  border: 1px solid #e3e3e3;
  padding: 6px 8px;
  text-align: center;
}

.budget-page .budget-table th {
  background: #f5f6f7;
  font-weight: 700;
}

.budget-page .monthly-inputM {
  width: 110px; /* wider inputs as in screenshot */
  padding: 8px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* Total cell */
.budget-page #totalBudgetM {
  background: #fafafa;
  border: none;
}

/* Remarks full width */
.budget-page .full-width textarea {
  width: 100%;
}

/* Submit button centered and styled */
.budget-page .btn-submit {
  display: inline-block;
  margin: 26px auto 0;
  padding: 10px 28px;
  background: linear-gradient(180deg,#2aa0ff,#007bff);
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 1100px) {
  .budget-page #modContainer.content-container {
    padding: 22px 26px;
  }

  .budget-page .form-group label {
    flex: 0 0 140px;
  }

  .budget-page .monthly-inputM {
    width: 90px;
  }
}

@media (max-width: 680px) {
  .budget-page .form-group label {
    flex-basis: 100%;
    text-align: left;
  }
  .budget-page .form-group { gap: 8px; }
}
/* Modal background */
#opoModal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro semi-transparente */
}

/* Contenido del modal */
#opoModal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease-in-out;
}

/* Animación suave al aparecer */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Botón de cierre */
#opoModal .close-modal {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}
#opoModal .close-modal:hover {
    color: #000;
}

/* Título del modal */
#opoModal h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

/* Input de búsqueda */
#opoModal #searchInput {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Contenedor de tabla */
#opoModal .table-container {
    overflow-x: auto;
    max-height: 400px;
}

/* Tabla dentro del modal */
#opoModal table {
    width: 100%;
    border-collapse: collapse;
}

#opoModal table th, #opoModal table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#opoModal table th {
    background-color: #f4f4f4;
    color: #333;
}

#opoModal table tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}


