.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    margin-top: 60px;
}

@media screen and (max-width: 1220px) {
    .container {
        padding: 0 15px;
    }
}

@media screen and (max-width: 800px) {
    .container {
        margin-top: 35px;
    }
}

/*------ MARGENES Y PADDINGS */
.mt-1 {
    margin-top: 1em;
}
.mt-2 {
    margin-top: 2em;
}
.mt-3 {
    margin-top: 3em;
}
.mt-4 {
    margin-top: 4em;
}

.ml-1 {
    margin-left: 1em;
}
.ml-2 {
    margin-left: 2em;  
}
.ml-3 {
    margin-left: 3em;
}
.ml-4 {
    margin-left: 4em;
}

.mb-1 {
    margin-bottom: 1em;
}
.mb-2 {
    margin-bottom: 2em;
}
.mb-3 {
    margin-bottom: 3em;
}
.mb-4 {
    margin-bottom: 4em;
}

.mr-1 {
    margin-right: 1em;
}
.mr-2 {
    margin-right: 2em;
}
.mr-3 {
    margin-right: 3em;
}
.mr-4 {
    margin-right: 4em;
}

.pt-1 {
    padding-top: 1em;
}
.pt-2 {
    padding-top: 2em;
}
.pt-3 {
    padding-top: 3em;
}
.pt-4 {
    padding-top: 4em;
}

.pl-1 {
    padding-left: 1em;
}
.pl-2 {
    padding-left: 2em;  
}
.pl-3 {
    padding-left: 3em;
}
.pl-4 {
    padding-left: 4em;
}

.pb-1 {
    padding-bottom: 1em;
}
.pb-2 {
    padding-bottom: 2em;
}
.pb-3 {
    padding-bottom: 3em;
}
.pb-4 {
    padding-bottom: 4em;
}

.pr-1 {
    padding-right: 1em;
}
.pr-2 {
    padding-right: 2em;
}
.pr-3 {
    padding-right: 3em;
}
.pr-4 {
    padding-right: 4em;
}

/*------ BOTONES */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    width: max-content;

    &:hover {
        opacity: .8;
    }
}

.btn:has(a) {
    padding: 0;
}


.btn a {
    display: block;
    padding: .5em .9em;
    color: inherit;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--gray);
    color: #d8d8d8;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: rgb(0, 0, 0);
}

.btn-icono {
    display: flex !important;
    align-items: center;
    gap: 7px;
}


/*----- SECCIONES  */
.section-options {
    padding: 1.5rem;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-header {
    background: #181818;
    color: #ffff;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
}

.section-content {
    padding: 1.5rem;
}

.section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.section__field {
    margin-bottom: 1rem;
}

.section__field-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.section__field-value {
    font-weight: 500;
}

@media screen and (max-width: 678px) {
    .section__grid {
        gap: 3px;
    }
}


/*----- tablas  */
.html-datatables {
    width: 100%;
    border-collapse: collapse;
}

.html-datatables th,
.html-datatables td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--table-border);
}

.html-datatables th {
    background: var(--table-bg-header);
    font-weight: bold;
}

.html-datatables th[data-label="no-wrap"] {
    text-wrap: nowrap;
}

.html-datatables tr:hover {
    background: var(--bg-hover);
}

.html-datatables td[data-label="no-wrap"] {
    text-wrap: nowrap;
}

.html-datatables td[data-label="opacity"] {
    opacity: .8;
}

.html-datatables-odd tr:nth-child(even) {
    background-color: var(--table-bg-odd);
}

.html-datatables-odd td {
    border-bottom: 0;
}

.html-datatables__text-up span {
    display: block;
    font-size: .9em;
    font-weight: bold;
}

/* Modificacion de estilos ya definidos de DataTables */
.dt-container .dt-info {
    font-size: .75em;
}

/*----- CARTAS  */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {

    background: #181818;
    color: #ffff;
    padding: 1rem;
    font-weight: bold;
}

.card-content {
    padding: 1rem;
    position: relative;
}

.card-total-span {
    position: absolute;
    right: 23px;
    bottom: 26px;
    font-size: .85em;
}

/*----- TABS  */
.tabs {
    display: flex;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: var(--tabs-bg);
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.tab.active {
    background: #4e4e4e;
    color: #ffff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/*---- BADGE */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
}

.badge-active {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-inactive {
    background: #FFEBEE;
    color: #C62828;
}

/*------ FORM */
.form {}

.form-grilla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.form__group {
    margin-bottom: 15px;
}

.form__group.form__group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form__group.column-all {
    grid-column: 2 span;
}

.form__group label {
    display: block;
    margin-bottom: 2px;
    margin-left: 3px;
    /* font-weight: bold; */
}

.form__group span {
    display: block;
    font-size: .8em;
    margin-left: 5px;
    opacity: .8;
}


.form select,
.form input,
.form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    resize: none;
}

.form button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;

    &:hover {
        opacity: .75;
    }
}

.form-grilla button[type="submit"] {
    grid-column: 2 span;
}

.form__message {
    background-color: #e7f3fe;
    border: 1px solid #b6d4fe;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

@media screen and (max-width: 678px) {
    .form-grilla {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 500px) {
    .form__group.form__group-grid {
        grid-template-columns: 1fr;
    }
}

/*----- DIVISOR --------*/
.divisor {
    height: 1px;
    width: 100%;
    background-color: #c1c1c1;
    margin: 30px 5px;
}

/*------- TABS ------------*/
.tabs-container {
  max-width: 420px;
  font-family: Arial, sans-serif;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 12px;
}

.tab {
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: #e3e3e3;
  border-bottom-color: #bfc0c2;
  font-weight: 600;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.tab-content.active {
  display: flex;
}

.tab-content label {
  font-size: 14px;
  font-weight: 600;
}

.tab-content input {
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.tab-content small {
  font-size: 12px;
  color: #666;
}


/*------ INPUT SUBIDA DE UN ARCHIVO -------*/
.file-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 720px;
  font-family: Arial, sans-serif;
}
.file-upload h4 {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 500;
}

.file-upload label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Ocultamos el input real */
.file-upload input[type="file"] {
  display: none;
}

/* Botón personalizado */
.file-upload label::after {
  content: "Seleccionar archivo";
  display: inline-block;
  margin-top: 6px;
  padding: 10px 14px;
  background-color: #838992; /* azul institucional */
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  width: fit-content;
  transition: background-color 0.2s ease;
}

.file-upload label:hover::after {
  background-color: #155ac1;
}

.file-upload small {
  font-size: 12px;
  color: #666;
}

/*---------- INPUT SUBIDA DE VARIOS ARCHIVOS ---------*/
.attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  font-family: Arial, sans-serif;
}

.attachments label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Ocultamos input */
.attachments input[type="file"] {
  display: none;
}

/* Botón */
.attachments label::after {
  content: "Agregar archivo";
  display: inline-block;
  margin-top: 6px;
  padding: 10px 14px;
  background-color: #1f6feb;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  width: fit-content;
}

.attachments-list {
  margin-top: 10px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 10px;
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.placeholder {
  font-size: 13px;
  color: #888;
  text-align: center;
}

/* Item */
.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attachment-info img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
}

.pdf-icon {
  font-size: 28px;
}

.file-name {
  font-size: 13px;
  color: #333;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-btn {
  background: none;
  border: none;
  color: #c62828;
  font-size: 13px;
  cursor: pointer;
}
