/* WRAPPERS */

.login_wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 20rem;

  h1,
  h2,
  h3 {
    all: unset;
    line-height: 1.5;
  }

  h1 {
    font-family: var(--font-dmsans);
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }

  h2 {
    font-size: 1.625rem;
    margin-bottom: 1rem;
  }

  h3 {
    width: 90%;
    font-family: var(--font-dmsans);
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  .login_container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 25rem;
    font-family: var(--font-poppins);
    background-color: var(--clr-background-modal);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  @media (max-width: 40rem) {
    .login_container {
      min-width: 20rem;
    }

    h3 {
      width: 90%;
    }
  }
}

.dashboard_wrapper {
  align-items: stretch;
  background-color: var(--clr-primary);
  display: flex;
  width: 100%;
}

.cta_wrapper_bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	padding-top: 1rem;
	gap: 0.875rem;

	button {
		text-align: center;
	}

  &.centered {
    justify-content: center;
  }

  &.space {
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: nowrap;

		.button_wrap {
			display: flex;
			justify-content: flex-end;
			flex-wrap: wrap;
			gap: 0.875rem;
		}
	}
}

/* COMPONENTS */

.dashboard_sidebar {
  direction: ltr;
  max-width: 15rem;
  min-width: 15rem;
  transition:
    margin-left .35s ease-in-out,
    left .35s ease-in-out,
    margin-right .35s ease-in-out,
    right .35s ease-in-out;
  z-index: 100;

  &.sidebar_opened {
    margin-left: 0;
  }

  &.sidebar_collapsed {
    margin-left: -15rem;
  }

  .sidebar_content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #222e3c;

    .sidebar_header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.15rem 1.5rem;

      .sidebar_brand {
        color: white;
        display: block;
        font-size: 1.15rem;
        font-weight: 600;
        text-decoration: none;
      }

      .sidebar_close {
        display: none;
      }
    }

    .sidebar_menu {
      flex-grow: 1;
      list-style: none;
      margin-bottom: 0;
      padding-left: 0;

      .menu_header {
        background: transparent;
        color: var(--clr-text-alt);
        font-size: 0.75rem;
        padding: 1.5rem 1.5rem .375rem;
      }

      .menu_item {
        display: flex;
        align-items: center;
        border-left: 0.188rem solid transparent;
        color: var(--clr-text-gray);
        font-weight: 400;
        padding: 0.625rem 1.375rem;
        position: relative;
        text-decoration: none;
        cursor: pointer;
        transition: background-color .1s ease-in-out;

        &:hover {
          color: var(--clr-text-offwhite);
        }

        &.active {
          background:
            linear-gradient(90deg,
              rgba(59, 125, 221, .1),
              rgba(59, 125, 221, .088) 50%,
              transparent);
          color: white;
          border-left: 0.188rem solid var(--clr-cta-blue);
        }

        i {
          width: 1rem;
          height: 1rem;
          color: var(--clr-text-gray);
        }

        p {
          margin-left: 0.75rem;
          margin-bottom: 0;
        }
      }
    }
  }
}

@media (max-width: 48rem) {
  .dashboard_sidebar {
    position: fixed;
    margin-left: -15rem;
    
    .sidebar_content {
      .sidebar_header {
        .sidebar_close {
          display: flex;
          color: white;
          cursor: pointer;
  
          &:hover {
            opacity: 0.85;
          }
        }
      }
    }
  }
}

.dashboard_main {
  display: flex;
  width: 100%;
  height: 100vh;
  transition:
    margin-left 0.35sease-in-out,
    left 0.35s ease-in-out,
    margin-right 0.35s ease-in-out,
    right 0.35s ease-in-out;
  background: #f5f7fb;
  flex-direction: column;
  overflow-y: auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.dashboard_nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  color: var(--clr-primary);
  border-bottom: 0;
  padding: 0.875rem 1.25rem;
  padding-right: 1rem;
  box-shadow: 0 0 2rem 0 rgba(33, 37, 41, .1);
  
  &:hover {
    .sidebar_toggle {
      color: var(--clr-cta-blue);
    }
  }
}

@media (max-width: 48rem) {
  .dashboard_nav {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 0.875rem;
  }
}

.dashboard_content {
  padding: 1.5rem;
  flex: 1;
  width: 100%;
  min-width: 20rem;
  max-width: 100rem;
  direction: ltr;
}

@media (max-width: 48rem) {
  .dashboard_content {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 30rem) {
  .dashboard_content {
    padding: 1.5rem 1rem;
  }
}

.content_header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  row-gap: 0.25rem;

  .header_title {
    min-width: fit-content;
    font-size: 1.375rem;
    margin-bottom: 0;
  }

  .header_btns {
    display: flex;
    column-gap: 0.5rem;
  }
}

@media (max-width: 48rem) {
  .content_header {
    .header_title {
      font-size: 1.25rem;
    }
  }
}

.dashboard_actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  .text_content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;

    p {
      display: flex;
      align-items: center;
      column-gap: 0.5rem;
      flex-wrap: nowrap;
      font-weight: 500;
      margin: 0;

      span {
        font-weight: 600;

        &.red {
          color: var(--clr-cta-red);
        }

        &.green {
          color: var(--clr-cta-green);
        }

        &.blue {
          color: var(--clr-cta-dark-blue);
        }
      }
    }
  }

  .btn_group {
    display: flex;
    align-items: stretch;
    justify-content: center;
    column-gap: 1rem;
  }
}

/* TABLE STYLES */

.dashboard_table {
  position: relative;
  background-color: white;
  overflow: auto;
  border-radius: 0.25rem;
  border: 0.5rem solid white;

  table {
    width: 100%;

    th:first-child, td:first-child {
      position: sticky;
      left: 0;
      background-color: white;
      z-index: 1;
    }
    
    th,
    td {
      padding: 0.625rem 1rem;
    }

    thead {
      tr {
        th {
          font-family: var(--font-dmsans);
          font-size: 0.813rem;
          color: var(--clr-text);

          &.name {
            min-width: 7rem;
            width: 8rem;
          }
        }

        .input_cell {
          min-width: 10rem;
        }

        .reg {
          min-width: 6rem;
        }

        .med {
          min-width: 8rem;
        }

        .long {
          min-width: 10rem;
        }

        .extra_long {
          min-width: 12rem;
        }

        th:last-of-type {
          width: 7rem;
        }
      }
    }

    tbody {
      &.row_btn {
        tr {
            cursor: pointer;
        }
      }

      tr {
        width: 100%;
        height: auto;
        transition: background-color 0.4s;

        &:hover {
          td {
            background-color: var(--clr-background);
          }
        }

        td {
          font-family: var(--font-inter);
          font-size: 0.813rem;

          .table_actions {
            display: flex;
            align-items: center;
            column-gap: 1rem;
            margin-left: 0.125rem;

            &.text_actions {
              width: max-content;
            }

            svg {
              width: 1rem;
              height: 1rem;
              cursor: pointer;

              &:hover {
                opacity: 0.85;
              }
            }

            .edit {
              stroke: var(--clr-cta-blue);
            }

            .activate,
            .loan {
              stroke: var(--clr-cta-green);
            }

            .trash {
              stroke: var(--clr-cta-red);
            }
          }
        }

        .extra_padl {
          padding-left: 1.25rem;
        }

        .input_cell {
          padding-top: 0.25rem;
          padding-bottom: 0.25rem;
        }

        .partiality_link {
          cursor: pointer;
          color: var(--clr-cta-blue);
          text-decoration: underline 0.063rem var(--clr-cta-blue);
          text-underline-offset: 0.125rem;
        }
      }
    }
  }
}

@media (max-width: 48rem) {
  .dashboard_table {
    position: relative;
    background-color: white;
    overflow: auto;
    border-radius: 0.25rem;
    border: 0.25rem solid white;

    table {
      th,
      td {
        padding: 0.563rem 0.875rem;
      }
    }
  }
}

.dialog_table {
  display: flex;
  width: 100%;
  max-height: 27rem;
  border-radius: 0.5rem;
  border: 0.375rem solid var(--clr-secondary);
  margin-bottom: 1.5rem;
  overflow: auto;

  &.top_collectors_table {
    max-height: 100%;
  }

  &:focus-visible {
    outline: 0;
    border: 0.375rem solid var(--clr-secondary);
  }

  table {
    width: 100%;
    min-width: 22.5rem;
    border-collapse: separate;
    border-spacing: 0;

    thead {
      position: sticky;
      top: 0;
      z-index: 2;

      tr {
        background-color: var(--clr-secondary);

        th {
          font-family: var(--font-dmsans);
          font-size: 0.813rem;
          padding: 0.5rem;
          color: var(--clr-text);
          position: sticky;
          top: 0;
          background-color: var(--clr-secondary);

          &:first-child {
            left: 0;
            z-index: 3;
          }
        }

        .date {
          min-width: 7rem;
        }

        .reg {
          min-width: 6rem;
        }

        .med {
          min-width: 8rem;
        }

        .long {
          min-width: 10rem;
        }
      }
    }

    tbody {
      tr {
        td {
          &:first-child {
            position: sticky;
            left: 0;
            z-index: 1;
            background-color: var(--clr-gray);
          }
        }
      }

      &.loan_table_dialog {
        tr {
          &:hover {
            td {
              background-color: var(--clr-background);
            }
          }
        }
      }

      tr {
        width: 100%;
        height: auto;
        background-color: var(--clr-soft-gray);
        transition: background-color 0.4s;

        td {
          font-family: var(--font-inter);
          font-size: 0.875rem;
          padding: 0.5rem;

          .table_actions {
            display: flex;
            column-gap: 1rem;
            margin-left: 0.25rem;

            svg {
              cursor: pointer;

              &:hover {
                opacity: 0.85;
              }
            }

            .edit {
              stroke: var(--clr-cta-blue);
            }

            .activate {
              stroke: var(--clr-cta-green);
            }

            .trash {
              stroke: var(--clr-cta-red);
            }
          }

          &.partiality_link {
            cursor: pointer;
            color: var(--clr-cta-blue);
            text-decoration: underline 0.063rem var(--clr-cta-blue);
            text-underline-offset: 0.125rem;
          }

          &.extra_padl {
            padding-left: 0.75rem;
          }

          &.justify_end {
            display: flex;
            justify-content: flex-end;
          }
        }
      }

      tr:last-of-type {
        td {
          padding-bottom: 0.625rem;
        }
      }
    }
  }
}

/* FORM STYLES */

.dashboard_form {
  background-color: white;
  overflow: auto;
  border-radius: 0.25rem;
  border: 0.5rem solid white;
  padding: 0.375rem 0.5rem;

  .form_container {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-family: var(--font-poppins);
    color: var(--clr-text);
    row-gap: 0.5rem;

    .section_title {
      display: flex;
      align-items: center;
      margin-bottom: 1rem;

      h5 {
        font-family: var(--font-inter);
        font-size: 1.125rem;
        font-weight: 500;
        color: var(--clr-related-text);
        margin-bottom: 0;
      }
    }

    .field_section {
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      justify-content: flex-start;
      width: 100%;
      row-gap: 1.125rem;
      margin-bottom: 1rem;

      .field_group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        flex: 1;
        width: 100%;
        column-gap: 2rem;
        row-gap: 1.125rem;

        &.fixed {
          .field_group_divided {
            flex-wrap: wrap;

            >.field_wrapper {
              min-width: 13.75rem;
            }
          }
        }

        &.align_end {
          align-items: flex-end;
        }

        &.align_stretch {
          align-items: stretch;
        }

        .field_group_divided {
          display: flex;
          flex: 1;
          min-width: 15rem;
          column-gap: 1rem;
          row-gap: 1.125rem;

          >.field_wrapper {
            min-width: 0;

            .small_label {
              font-size: 0.625rem;
            }
          }
        }
      }

      &.close {
        display: none;
      }
    }

    .field_wrapper {
      display: flex;
      flex-direction: column;
      flex: 1;
      align-items: flex-start;
      min-width: 9.5rem;

      &.area {
        min-width: 15rem;

        &.existing_user {
          opacity: 0.63;
          cursor: not-allowed;
        }

        .area_text {
          display: none;
          flex-basis: 100%;
          align-items: center;
          width: 100%;
          min-height: 2.25rem;
          font-size: 1rem;
          background-color: white;
          color: var(--clr-nav-text);
          border: 0.125rem solid var(--clr-secondary);
          border-radius: 0.25rem;
          padding: 0.25rem;
          margin-bottom: 0;
          transition: outline-offset 0.1s;
        }
      }

      &.field_wrapper_fixed {
        max-width: 10rem;
      }
    }

    label {
      height: 0.75rem;
      font-size: 0.75rem;
      min-width: max-content;
      margin-bottom: 0.5rem;
    }

    input,
    select,
    textarea {
      flex-basis: 100%;
      width: 100%;
      min-height: 2.25rem;
      font-size: 1rem;
      background-color: white;
      color: var(--clr-nav-text);
      border: 0.125rem solid var(--clr-secondary);
      border-radius: 0.25rem;
      padding: 0.25rem;
      transition: outline-offset 0.1s;

      &:focus {
        outline: 0.125rem solid var(--clr-input-outline);
        outline-offset: 0.188rem;

        &[type="submit"] {
          outline: 0.125rem solid var(--clr-accent);
        }
      }

      &[type="reset"] {
        height: 2.5rem;
        background-color: var(--clr-secondary);
        color: var(--clr-cta-text);
        text-align: center;
        border: none;
        cursor: pointer;
      }

      &[type="submit"] {
        height: 2.5rem;
        background-color: var(--clr-cta-blue);
        color: var(--clr-text-alt);
        text-align: center;
        border: none;
        cursor: pointer;
      }

      &.small_select {
        min-height: 1.875rem;
      }
    }

    select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      text-indent: 1px;
      text-overflow: '';
    }

    .select_wrapper {
      position: relative;
      width: 100%;

      &.select_wrapper_fixed {
        max-width: 10rem;
      }

      select {
        padding-right: 1.75rem;
      }
    }
    
    .select_wrapper::after {
      content: "";
      position: absolute;
      right: 0.75rem;
      top: 50%;
      width: 8px;
      height: 8px;
      border-right: 1.5px solid var(--clr-text);
      border-bottom: 1.5px solid var(--clr-text);
      transform: translateY(-70%) rotate(45deg);
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    
    select option[value=""][disabled] {
      display: none;
    }

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
      -webkit-box-shadow: 0 0 0 30px white inset !important;
    }

    .file_wrapper {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      height: 100%;
      width: 100%;
      column-gap: 0.25rem;

      &.maps {
        flex-wrap: nowrap;
        justify-content: flex-start;
        column-gap: 1rem;
      }

      @media (max-width: 64rem) {
        &.maps {
          justify-content: space-between;
        }
      }

      &.align_start {
        align-items: flex-start;
      }

      .file_actions {
        display: flex;
        align-items: center;
        min-width: fit-content;
        column-gap: 0.25rem;
      }
    }
    
    .file_input {
      all: unset;
      display: flex;
      flex-wrap: nowrap;
      flex-basis: 100%;
      width: 100%;
      max-width: 9rem;
      min-height: 2.25rem;
      font-size: 1rem;
      line-height: 1.25;
    }

    .form_btns {
      display: flex;
      align-items: center;
      flex: 1;
      width: 100%;
      column-gap: 1rem;
      row-gap: 1.25rem;

      &.align_end {
        align-items: flex-end;
      }

      &.divided {
        flex-wrap: wrap;
      }

      .form_btns_divided {
        display: flex;
        flex: 1;
        min-width: 15rem;
        column-gap: 1rem;
      }

      .form_btn {
        width: 10rem !important;
        font-size: 0.875rem;

        &:hover {
          opacity: 0.85;
        }
      }
    }
  }
}

.dialog_form {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-family: var(--font-poppins);
  color: var(--clr-text);
  row-gap: 0.5rem;

  .section_title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;

    h5 {
      font-family: var(--font-inter);
      font-size: 1rem;
      font-weight: 500;
      color: var(--clr-related-text);
      margin-bottom: 0;
    }
  }

  .field_section {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    row-gap: 1.125rem;
    margin-bottom: 1rem;

    .field_group {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      flex: 1;
      width: 100%;
      column-gap: 2rem;
      row-gap: 1.125rem;

      .field_group_divided {
        display: flex;
        flex: 1;
        align-items: center;
        min-width: 15rem;
        column-gap: 1rem;
        row-gap: 1.125rem;

        >.field_wrapper {
          min-width: 0;

          .small_label {
            font-size: 0.625rem;
          }
        }

        &.align_end {
          align-items: flex-end;

          .cta_margin {
            margin-bottom: 0.125rem;
          }
        }
      }
    }

    .response_message {
      display: none;
      flex-direction: column;
      flex-wrap: wrap;
      gap: 0.5rem;

      p {
        margin-bottom: 0;
      }
      
      span {
        &.green {
          color: var(--clr-cta-green);
        }

        &.red {
          color: var(--clr-cta-red);
        }
      }
    }
  }

  .field_wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: flex-start;
    min-width: 9.5rem;

    &.area {
      min-width: 15rem;

      &.existing_user {
        opacity: 0.63;
        cursor: not-allowed;
      }

      .area_text {
        display: none;
        flex-basis: 100%;
        align-items: center;
        width: 100%;
        min-height: 2.25rem;
        font-size: 1rem;
        background-color: white;
        color: var(--clr-nav-text);
        border: 0.125rem solid var(--clr-secondary);
        border-radius: 0.25rem;
        padding: 0.25rem;
        margin-bottom: 0;
        transition: outline-offset 0.1s;
      }
    }
  }

  label {
    height: 0.75rem;
    font-size: 0.75rem;
    min-width: max-content;
    margin-bottom: 0.5rem;
  }

  input:not([type="checkbox"]),
  select,
  textarea,
  .select_like_btn {
    flex-basis: 100%;
    width: 100%;
    min-height: 2.25rem;
    font-size: 1rem;
    background-color: white;
    color: var(--clr-nav-text);
    border: 0.125rem solid var(--clr-secondary);
    border-radius: 0.25rem;
    padding: 0.25rem;
    transition: outline-offset 0.1s;

    &:focus {
      outline: 0.125rem solid var(--clr-input-outline);
      outline-offset: 0.188rem;

      &[type="submit"] {
        outline: 0.125rem solid var(--clr-accent);
      }
    }

    &[type="reset"] {
      height: 2.5rem;
      background-color: var(--clr-secondary);
      color: var(--clr-cta-text);
      text-align: center;
      border: none;
      cursor: pointer;
    }

    &[type="submit"] {
      height: 2.5rem;
      background-color: var(--clr-cta-blue);
      color: var(--clr-text-alt);
      text-align: center;
      border: none;
      cursor: pointer;
    }

    &.small_select {
      min-height: 1.875rem;
    }
  }

  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
    padding-right: 1.75rem;
  }

  .select_wrapper {
    position: relative;
    width: 100%;
  }
  
  .select_wrapper::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--clr-text);
    border-bottom: 1.5px solid var(--clr-text);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  
  select option[value=""][disabled] {
    display: none;
  }

  .select_like_btn {
    display: -webkit-box;
    max-height: 2.25rem;
    line-height: 1.5rem;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: start;
    text-overflow: ellipsis;
    white-space: normal;
    overflow: hidden;
  }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
  }

  .form_btns {
    display: flex;
    align-items: center;
    flex: 1;
    width: 100%;
    column-gap: 2rem;
    row-gap: 1.25rem;

    .form_btn {
      width: 10rem !important;
      font-size: 0.875rem;

      &:hover {
        opacity: 0.85;
      }
    }
  }
}

/* CUSTOM DIALOG */

.dialog_container {
  position: relative;
  width: 80%;
  min-width: 20rem;
  max-width: 40rem;
  height: fit-content;
  max-height: 40rem;
  background-color: var(--clr-background);
  border: none;
  border-radius: 1rem;
  padding: 2rem;

  &.dialog_details {
    width: 90%;
    max-width: 90rem;
  }

  .dialog_title {
    font-family: var(--font-inter);
    font-size: 1rem;
    font-weight: 500;
    color: var(--clr-related-text);
    margin-bottom: 1rem;
  }

  .dialog_map {
    width: 100%;
    height: 20rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }

  .dialog_map_location {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;

    .location_label {
      font-weight: 500;
      margin-bottom: 0.5rem;
    }

    p {
      margin-bottom: 0;
    }
  }

  .close_btn {
    position: absolute;
    top: 1.948rem;
    right: 2rem;
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    &:hover {
      .close_btn::before,
      .close_btn::after {
        background-color: var(--clr-text);
      }
    }

    &::before,
    &::after {
      content: "";
      position: absolute;
      width: 100%;
      height: 0.188rem;
      background-color: var(--clr-text);
      border-radius: 0.125rem;
    }

    &::before {
      transform: rotate(45deg);
    }

    &::after {
      transform: rotate(-45deg);
    }
  }
}

dialog {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.15s ease, transform 0.15s ease;

  &.with_dropdown {
    overflow: visible !important;
  }

  @starting-style {
    opacity: 0.8;
    transform: scale(0.95);
  }

  &::backdrop {
    background-color: rgba(73, 73, 73, 0.1);
    backdrop-filter: blur(2px);
  }
  
  p {
    line-height: 1.5;
  }
}

/* CUSTOM FIELDS */

.text_input {
  width: 11rem;
  align-items: center;
  color: var(--clr-text);
  caret-color: var(--clr-text);
  border: 0.125rem solid var(--clr-secondary);
  border-radius: 0.25rem;
  padding: 0.313rem;
  padding-left: 0.5rem;
  padding-bottom: 0.375rem;
  transition: outline-offset 0.1s;

  &:focus {
    outline: 0.125rem solid var(--clr-input-outline);
    outline-offset: 0.125rem;
    transition: outline-offset 0.1s, ;
  }

  &.min_fixed {
    min-width: 12.5rem;
  }
}

.radio_indicator {
  display: flex;
  align-items: center;

  &.active {
    span {
      background-color: white;
      border-color: var(--clr-cta-blue);
    }

    span::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 0.5rem;
      height: 0.5rem;
      background-color: var(--clr-cta-blue);
      border-radius: 50%;
    }
  }

  span {
    display: flex;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    border: 0.125rem solid var(--clr-cta-blue);
    position: relative;
    margin-right: 0.5rem;
  }
}

/* CUSTOM ELEMENTS */

.login_field {
  position: relative;
  margin-bottom: 1.75rem;

  .helper_text {
    position: absolute;
    left: 0rem;
    bottom: -2rem;
  }

  &.login_btn {
    .helper_text {
      bottom: -2.5rem;
    }
  }
}

.custom_cta {
  font-family: var(--font-poppins);
  font-size: 0.875rem;
  background-color: var(--clr-cta-blue);
  color: var(--clr-text-alt);
  border: none;
  border-radius: 0.25rem;
  padding: 0.625rem 0.75rem;
  transition: opacity 0.1s;
  text-decoration: none;

  &:hover {
    opacity: 0.9;
    text-decoration: none;
  }

  &.spinner {
    svg {
      width: 1rem !important;
    }
  }
  
  &.small_icon {
    svg {
      width: 1rem;
      height: 1rem;
    }
  }

  svg {
    stroke: var(--clr-text-alt);
  }

  &.darkblue {
    background-color: var(--clr-cta-dark-blue);
  }

  &.green {
    background-color: var(--clr-cta-green);
  }

  &.red {
    background-color: var(--clr-cta-red);
  }

  &.yellow {
    background-color: var(--clr-cta-yellow);
  }

  &.gray {
    background-color: var(--clr-cta-gray);
    color: var(--clr-text);
  }

  &:disabled,
  &[disabled] {
    opacity: 0.5;
    cursor: not-allowed;

    &:hover {
      opacity: 0.5;
    }
  }

  &.custom_cta_fixed {
    min-width: 6rem;
  }

  &.custom_cta_sm {
    padding: 0.5rem 0.625rem;
  }

  &.custom_cta_xs {
    padding: 0.375rem 0.5rem;
  }

  &.custom_cta_tiny {
    min-width: fit-content;
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
    line-height: 1.2;

    &.text_icon {
      padding-right: 0.5rem;
    }
  }

  &.custom_cta_tooltip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    &:hover {
      .tooltip {
        top: -40px;
        opacity: 1;
        transition-duration: 0.3s;
      }
    }
  }

  &.custom_cta_space {
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 0.25rem;

    &.adjust_icon {
      margin-bottom: 0.063rem;

      >span {
        margin-top: 0.125rem;
      }
    }
  }
}

@media (max-width: 48rem) {
  .custom_cta {
    font-size: 0.75rem;
    border-radius: 0.25rem;
    padding: 0.563rem 0.688rem;
    transition: opacity 0.1s;
  
    &:hover {
      opacity: 0.9;
    }
  }
}

.table_text_btn {
  font-family: var(--font-poppins);
  font-size: 0.75rem;
  color: var(--clr-text-alt);
  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  transition: opacity 0.1s;

  &:hover {
    opacity: 0.9;
  }

  &.green {
    background-color: var(--clr-cta-green);
  }

  &.red {
    background-color: var(--clr-cta-red);
  }

  &.gray {
    background-color: var(--clr-cta-gray);
    color: var(--clr-text);
  }
}

.snack_bar {
	position: fixed;
	top: 3.25rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-width: 18rem;
	max-width: 18rem;
	background-color: var(--clr-primary);
	font-family: var(--font-dmsans);
	font-weight: 500;
	color: var(--clr-text-alt);
	padding: 0.75rem 1.063rem;
	border-radius: 0.75rem;
	box-shadow: 0.125rem 0.125rem 0.125rem 0.063rem var(--clr-secondary);
	opacity: 0;
	z-index: -1;

	svg {
		width: 1.875rem;
		height: 1.25rem;
		fill: #fff;
  }
	  
	.snack_text {
		font-size: 1rem;
    line-height: 1.25;
	}

	&.show {
		opacity: 1;
		z-index: 1000;
		transition: opacity 0.3s ease-in-out;
	}
}

/* SMALL CLASSES */

.spacing {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.section_title {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;

  &.with_actions {
    justify-content: space-between;
    cursor: pointer;

    &.no_margin {
      margin-bottom: 0;
    }
  }

  h5 {
    font-family: var(--font-inter);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--clr-related-text);
    margin-bottom: 0;
  }

  .accordion {
    width: 2rem;
    height: 2rem;
    padding: 0.5rem;
    background-color: var(--clr-soft-gray);
    border-radius: 100rem;
    transition: opacity 0.3s ease;

    &:hover {
      opacity: 0.85;
      transition: opacity 0.3s ease;
    }

    &.close {
      transform: rotate(-180deg);
    }

    >svg {
      color: white;
    }
  }
}

.side_button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;

  svg {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--clr-cta-blue);

    &:hover {
      opacity: 0.85;
    }
  }

  .icon_button {
    cursor: pointer;
  }
}

.checkbox_dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 0;
  background-color: white;
  border: 0.125rem solid var(--clr-secondary);
  border-top: none;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  margin-top: -0.25rem;
  opacity: 0;
  z-index: 100;
  transition: max-height 0.3s ease, opacity 0.4s ease;
  
  label {
    display: none;
    height: auto !important;
    font-size: 1rem !important;
    min-width: max-content;
    column-gap: 0.25rem;
    padding: 0.5rem !important;
    margin: 0 !important;
    transition: background-color 0.3s ease;

    &:hover {
      background-color: var(--clr-soft-gray);
      cursor: pointer;
      transition: background-color 0.3s ease;
    }
  }

  p {
    font-size: 1rem !important;
    padding: 0.5rem !important;
    margin: 0 !important;
  }

  &.open {
    max-height: 10rem;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.4s ease;

    label {
      display: flex;
    }
  }
}

.error_message {
  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  overflow: hidden;
  color: var(--clr-cta-red);
  margin-top: 0.313rem;
  margin-left: 0.125rem;

  &.no_margin {
    margin: 0;
  }

  &.normal_size {
    font-size: 0.875rem;
  }

  &.small_size {
    font-size: 0.75rem;
  }
}

.response_message {
  display: none;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.5rem;

  p {
    margin-bottom: 0;
  }
  
  span {
    font-weight: 500;
    
    &.green {
      color: var(--clr-cta-green);
    }

    &.red {
      color: var(--clr-cta-red);
    }
  }
}

.tooltip {
  position: absolute;
  top: -1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9rem;
  background-color: var(--clr-secondary);
  color: var(--clr-text);
  letter-spacing: 0.5px;
  border-radius: 0.25rem;
  padding: 0.313rem 0.625rem;
  opacity: 0;
  pointer-events: none;
  transition-duration: 0.2s;

  &::before {
    position: absolute;
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    background-color: var(--clr-secondary);
    background-size: 1000%;
    background-position: center;
    transform: rotate(45deg);
    bottom: -10%;
    transition-duration: 0.3s;
  }
}

/* ISOLATED CLASSES */

.field_wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: flex-start;

  &.flex_row {
    align-items: center;
    flex-direction: row;

    label {
      font-size: 0.875rem;
      margin-bottom: 0;
    }
  }

  &.flex_wrap {
    flex-wrap: wrap;
  }

  &.fixed {
    max-width: 16rem;
  }

  &.fixed_lg {
    max-width: 18rem;
  }

  &.fixed_lg_min {
    min-width: 18rem;
    max-width: 18rem;
  }

  label {
    height: 0.75rem;
    font-size: 0.75rem;
    min-width: max-content;
    margin-bottom: 0.5rem;
  }

  input:not([type="checkbox"]),
  select,
  .select_like_btn {
    flex-basis: 100%;
    width: 100%;
    min-height: 2.25rem;
    font-size: 1rem;
    background-color: white;
    color: var(--clr-nav-text);
    border: 0.125rem solid var(--clr-secondary);
    border-radius: 0.25rem;
    padding: 0.25rem;
    transition: outline-offset 0.1s;

    &:focus {
      outline: 0.125rem solid var(--clr-input-outline);
      outline-offset: 0.188rem;

      &[type="submit"] {
        outline: 0.125rem solid var(--clr-accent);
      }
    }

    &[type="reset"] {
      height: 2.5rem;
      background-color: var(--clr-secondary);
      color: var(--clr-cta-text);
      text-align: center;
      border: none;
      cursor: pointer;
    }

    &[type="submit"] {
      height: 2.5rem;
      background-color: var(--clr-cta-blue);
      color: var(--clr-text-alt);
      text-align: center;
      border: none;
      cursor: pointer;
    }

    &.small_select {
      min-height: 1.875rem;
    }

    &.min_fixed {
      min-width: 7.75rem;
    }

    &.max_fixed {
      max-width: 16rem;
    }
  }

  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
    padding-right: 1.75rem;
  }

  .select_wrapper {
    position: relative;
    width: 100%;
  }
  
  .select_wrapper::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--clr-text);
    border-bottom: 1.5px solid var(--clr-text);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  
  select option[value=""][disabled] {
    display: none;
  }

  .select_like_btn {
    display: -webkit-box;
    max-height: 2.25rem;
    line-height: 1.5rem;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: start;
    text-overflow: ellipsis;
    white-space: normal;
    overflow: hidden;
  }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
  }
}

/* LOADERS */

.spinner {
  svg {
    width: 1.25rem;
    transform-origin: center;
    animation: rotation 2s linear infinite;

    circle {
      fill: none;
      stroke: var(--clr-text-alt);
      stroke-width: 7;
      stroke-dasharray: 1, 200;
      stroke-dashoffset: 0;
      stroke-linecap: round;
      animation: circle-dash 1.5s ease-in-out infinite;
     }
   }
}

.page_loader {
  position: fixed;
  display: none;
  width: 100vw;
  height: 100vh;
  background-color: rgba(203, 203, 203, 0.1);
  backdrop-filter: blur(3px);
  z-index: 1000;

  &.loading {
    display: block;
  }

  .loader_shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    aspect-ratio: 1;
  
  
    &::before,
    &::after {
      content: "";
      position: absolute;
      border-radius: 3rem;
      box-shadow: 0 0 0 4px inset var(--clr-primary);
      animation: chrono-load 2.5s infinite;
    }

    &::after {
      animation-delay: -1.25s;
    }
  }
}

/* ANIMATIONS */

@keyframes rotation {
  100% {
    transform: rotate(360deg);
  }
}
 
@keyframes circle-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 200;
    stroke-dashoffset: -35px;
  }

  100% {
    stroke-dashoffset: -125px;
  }
}

@keyframes fade-in {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 30px;
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    top: 30px;
    opacity: 1;
  }
  to {
    top: 0;
    opacity: 0;
  }
}

@keyframes chrono-load {
  0% {
    inset: 0 35px 35px 0;
  }
  12.5% {
    inset: 0 35px 0 0;
  }
  25% {
    inset: 35px 35px 0 0;
  }
  37.5% {
    inset: 35px 0 0 0;
  }
  50% {
    inset: 35px 0 0 35px;
  }
  62.5% {
    inset: 0 0 0 35px;
  }
  75% {
    inset: 0 0 35px 35px;
  }
  87.5% {
    inset: 0 0 35px 0;
  }
  100% {
    inset: 0 35px 35px 0;
  }
}

/* Dashboard Charts Styles */
.dashboard_charts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.chart_row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.chart_card {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
}

.chart_card_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.chart_card_header h5 {
  font-family: var(--font-inter);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-text);
  margin: 0;
}

.chart_subtitle {
  font-size: 0.85rem;
  color: #666;
  margin: 0.25rem 0 0 0;
}

.chart_details_btn {
  background: none;
  border: none;
  color: var(--clr-cta-blue);
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.chart_details_btn:hover {
  opacity: 0.85;
}

.chart_container {
  position: relative;
  height: 300px;
  width: 100%;
}

.chart_container canvas {
  max-width: 100%;
  max-height: 100%;
}

.chart_placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6c757d;
  font-size: 0.9rem;
  text-align: center;
  flex-direction: column;
  gap: 0.5rem;
}

.chart_placeholder i {
  font-size: 2rem;
  color: #dee2e6;
}

/* Confidentiality notice */
.confidentiality_notice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem 1rem;
}

.confidentiality_card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-left: 5px solid #e53e3e;
  border-radius: 10px;
  max-width: 680px;
  width: 100%;
  padding: 2rem 2.2rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.confidentiality_icon {
  margin-bottom: 0.8rem;
  color: #e53e3e;
}

.confidentiality_icon svg {
  width: 36px;
  height: 36px;
  stroke: #e53e3e;
}

.confidentiality_title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.9rem 0;
}

.confidentiality_intro {
  font-size: 0.95rem;
  color: #4a5568;
  margin: 0 0 0.5rem 0;
}

.confidentiality_list {
  padding-left: 1.4rem;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.confidentiality_list li {
  font-size: 0.93rem;
  color: #4a5568;
  line-height: 1.55;
}

.confidentiality_warning {
  font-size: 0.88rem;
  color: #742a2a;
  background: #fff5f5;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0;
  line-height: 1.6;
}



@media (max-width: 768px) {
  .chart_row {
    flex-direction: column;
  }
  
  .chart_card {
    min-width: 100%;
  }
  
  .chart_card_header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .chart_container {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .chart_container {
    height: 200px;
  }
  
  .chart_card {
    padding: 1rem;
  }
}

/* Loan Approval Dashboard Styles */
.loan_approval_cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.loan_card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.25rem 1.5rem;
  min-width: 260px;
  max-width: 300px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.loan_card_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.loan_card_name {
  font-weight: 600;
  font-size: 1.1rem;
}
.loan_card_status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #e0e0e0;
}
.status-complete {
  background: var(--clr-approved-bg);
  border-color: var(--clr-approved);
}
.status-pending {
  background: var(--clr-pending-bg);
  border-color: var(--clr-pending);
}
.status-danger {
  background: var(--clr-danger-bg);
  border-color: var(--clr-danger);
}
.loan_card_details {
  color: #1a73e8;
  font-size: 0.95rem;
  text-decoration: underline;
  cursor: pointer;
}
.loan_card_actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.loan_approval_legend {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  font-size: 0.98rem;
  align-items: center;
}
.legend-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 0.5em;
  border: 2px solid #e0e0e0;
  vertical-align: middle;
}
.legend-dot.status-complete {
  background: var(--clr-approved-bg);
  border-color: var(--clr-approved);
}
.legend-dot.status-pending {
  background: var(--clr-pending-bg);
  border-color: var(--clr-pending);
}
.legend-dot.status-danger {
  background: var(--clr-danger-bg);
  border-color: var(--clr-danger);
}

.approval_details_modal .details_section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1rem;
}
.details_subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  color: var(--clr-cta-blue);
}
.details_block {
  background: #f7fafd;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}
.details_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}
.details_address {
  flex-basis: 100%;
  margin-top: 0.25rem;
  color: #444;
}
.file_btn_group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.details_guarantors {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.guarantor_card {
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Account Dropdown Styles */
.account_dropdown {
  position: relative;
  display: flex;
}

.account_toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--clr-text-dark);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.chevron_icon {
  width: 16px;
  height: 16px;
  color: #6c757d;
  transition: transform 0.2s ease;
}

.account_dropdown.show .chevron_icon {
  transform: rotate(180deg);
}

.account_toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--clr-text-dark);
}

.dropdown_menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.account_dropdown.show .dropdown_menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown_item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--clr-text-dark);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}

.dropdown_item svg {
  width: 16px;
  height: 16px;
  color: #6c757d;
}

/* Menu loading and error states */
.menu_loading {
  opacity: 0.7;
  pointer-events: none;
}

.menu_loading i {
  animation: spin 1s linear infinite;
}

.menu_error {
  color: var(--clr-cta-red);
  opacity: 0.8;
}

.menu_error i {
  color: var(--clr-cta-red);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.autocomplete_dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #fff;
  border: 1px solid var(--bs-border-color);
  border-top: none;
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete_item {
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s ease-in-out;
}

.autocomplete_item:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.autocomplete_item:last-child {
  border-bottom: none;
}

/* ========= Paleta para dark ========= */
.darkmode--activated{
  --bg:#0b0d0f;
  --panel:#121418;
  --panel-2:#0f1115;
  --border:#2b2f3a;
  --fg:#e9ecf1;
  --muted:#a8afbd;
  --link:#8ab4ff;
  --success:#22c55e;
  --danger:#ef4444;
}

/* Fondo y texto global */
.darkmode--activated body{ background:var(--bg); color:var(--fg); }

/* Topbar / header (ajusta al selector que uses) */
.darkmode--activated .topbar,
.darkmode--activated header{
  background:var(--panel-2);
  color:var(--fg);
  border-bottom:1px solid var(--border);
}

/* Paneles / contenedores */
.darkmode--activated .content_box,
.darkmode--activated .dashboard_actions,
.darkmode--activated .table_wrapper,
.darkmode--activated .card{
  background:var(--panel);
  color:var(--fg);
  border:1px solid var(--border);
}

/* ======= TABLA ======= */
.darkmode--activated table{ color:var(--fg); border-color:var(--border); }
.darkmode--activated thead th{
  background:var(--panel-2) !important;
  color:#f5f7fa;
  border-bottom:1px solid var(--border);
  font-weight:600;
}
.darkmode--activated tbody tr{ border-bottom:1px solid var(--border); }
.darkmode--activated tbody tr:nth-child(odd) td{ background:#14161b !important; }
.darkmode--activated tbody tr:nth-child(even) td{ background:#101217 !important; }
.darkmode--activated tbody tr:hover td{ background:#171a21 !important; }

/* Primera columna (se veía lavada) */
.darkmode--activated tbody td:first-child{
  background:transparent !important;
  color:var(--fg);
}
.darkmode--activated tbody td:first-child a{
  color:var(--link);
  text-decoration:underline;
}

/* Links */
.darkmode--activated a{ color:var(--link); }
.darkmode--activated a:hover{ color:#bcd3ff; }

/* ======= FORM / CONTROLES ======= */
.darkmode--activated input[type="text"],
.darkmode--activated input[type="number"],
.darkmode--activated input[type="email"],
.darkmode--activated input[type="password"],
.darkmode--activated .text_input,
.darkmode--activated select,
.darkmode--activated textarea{
  background:#0f1115 !important;
  color:var(--fg) !important;
  border:1px solid var(--border) !important;
}
.darkmode--activated input::placeholder,
.darkmode--activated textarea::placeholder{ color:var(--muted); }

.darkmode--activated input:focus,
.darkmode--activated select:focus,
.darkmode--activated textarea:focus{
  outline:2px solid #3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,.25);
}

/* ======= BOTONES ======= */
.darkmode--activated .custom_cta,
.darkmode--activated .table_text_btn{
  background:#1f2937;
  color:#fff;
  border:1px solid #334155;
}
.darkmode--activated .custom_cta.btn-secondary{ background:#3b82f6; border-color:#2563eb; }
.darkmode--activated .table_text_btn.red{ background:var(--danger); border-color:#b91c1c; color:#fff; }
.darkmode--activated .table_text_btn:hover,
.darkmode--activated .custom_cta:hover{ filter:brightness(1.08); }

/* Badges / resaltados */
.darkmode--activated .green{ color:#86efac; }

/* Iconos feather/acciones */
.darkmode--activated svg.feather,
.darkmode--activated .table_actions svg{ stroke:var(--fg); }

/* Evitar inversión de logos/imágenes específicas */
.darkmode--activated .darkmode-ignore{ filter:none !important; mix-blend-mode:normal !important; }



.rm-modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); z-index: 9999; }
.rm-hidden { display: none !important; }
.rm-card { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.20); }
.rm-subtitle { margin-top: 4px; color: #666; }
.rm-field { margin-top: 12px; display: grid; gap: 6px; }
#rm-amount { padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; }
.rm-error { color: #c0392b; font-size: 13px; }
.rm-actions { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }
.rm-btn { padding: 10px 14px; border: 0; border-radius: 8px; cursor: pointer; font-weight: 600; }
.rm-secondary { background: #f2f2f2; }
.rm-primary { background: #2d6cdf; color: #fff; }
.rm-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* =============================================================================
   PAYROLL MODULE STYLES
   ============================================================================= */

.payroll_controls_bar { background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.payroll_controls_row { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.payroll_controls_row .field_wrapper { margin-bottom: 0; }
.payroll_controls_row .flex_grow { flex: 1 1 180px; }
.payroll_week_btns { display: flex; gap: .5rem; flex-wrap: nowrap; padding-bottom: 2px; }
.custom_cta_sm { padding: .3rem .75rem; font-size: .8rem; border-radius: 6px; border: 1px solid var(--primary, #2d6cdf); background: transparent; color: var(--primary, #2d6cdf); cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.custom_cta_sm:hover { background: var(--primary, #2d6cdf); color: #fff; }
.custom_cta_sm.gray { border-color: #9ca3af; color: #6b7280; }
.custom_cta_sm.gray:hover { background: #9ca3af; color: #fff; }

.payroll_status_badge { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 20px; letter-spacing: .03em; text-transform: uppercase; }
.badge_none     { background: #f3f4f6; color: #6b7280; }
.badge_preview  { background: #dbeafe; color: #1d4ed8; }
.badge_approved { background: #d1fae5; color: #065f46; }
.badge_paid     { background: #fce7f3; color: #9d174d; }

.payroll_summary_cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .payroll_summary_cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .payroll_summary_cards { grid-template-columns: 1fr; } }
.payroll_card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: .9rem 1rem; }
.payroll_card--highlight { border-color: var(--primary, #2d6cdf); }
.payroll_card_icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.payroll_card_icon svg { width: 18px; height: 18px; }
.payroll_card_icon--blue   { background: #eff6ff; color: #1d4ed8; }
.payroll_card_icon--green  { background: #f0fdf4; color: #15803d; }
.payroll_card_icon--yellow { background: #fefce8; color: #a16207; }
.payroll_card_icon--dark   { background: #f1f5f9; color: #334155; }
.payroll_card_icon--purple { background: #f5f3ff; color: #7c3aed; }

/* Runs filters */
.payroll_runs_filters { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }

/* Charts grid */
.payroll_charts_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: .5rem; }
.payroll_chart_card { background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: 1rem; }
.payroll_chart_card h5 { margin: 0 0 .75rem; font-size: .82rem; font-weight: 600; color: #374151; }
.payroll_card_body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.payroll_card_label { font-size: .72rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.payroll_card_value { font-size: 1.25rem; font-weight: 700; color: #111827; }
.payroll_card_sub { font-size: .75rem; color: #9ca3af; }

.payroll_tabs_bar { display: flex; gap: 0; border-bottom: 2px solid var(--border-color, #e5e7eb); margin-bottom: .75rem; }
.payroll_tab { padding: .5rem 1.1rem; font-size: .85rem; font-weight: 600; color: #6b7280; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; margin-bottom: -2px; }
.payroll_tab:hover { color: var(--primary, #2d6cdf); }
.payroll_tab.tab_active { color: var(--primary, #2d6cdf); border-bottom-color: var(--primary, #2d6cdf); }

.rate_cell { display: flex; align-items: center; gap: .35rem; }
.rate_input { width: 72px; padding: .25rem .4rem; font-size: .82rem; border: 1px solid #d1d5db; border-radius: 5px; text-align: right; }
.rate_input:focus { outline: none; border-color: var(--primary, #2d6cdf); }
.icon_btn { background: transparent; border: none; cursor: pointer; padding: 2px 4px; border-radius: 4px; color: #6b7280; line-height: 1; }
.icon_btn_save { color: #15803d; }
.icon_btn_save:hover { background: #f0fdf4; }
.icon_btn:hover { background: #f3f4f6; }

.num_cell { text-align: right; font-variant-numeric: tabular-nums; }
.currency_prefix { color: #6b7280; font-size: .8em; margin-right: 1px; }
.color_payout { color: #15803d; font-weight: 700; }
.fw_medium { font-weight: 500; }
.fw_bold { font-weight: 700; }
.row_highlight_green { background: #f0fdf4 !important; }
.empty_cell { text-align: center; color: #9ca3af; padding: 2rem 0; font-style: italic; }

.run_detail_card { background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: 1.25rem; }
.run_detail_header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.run_detail_totals { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.run_detail_total_item { display: flex; flex-direction: column; gap: 2px; }
.run_detail_total_item span:first-child { font-size: .72rem; font-weight: 600; color: #6b7280; text-transform: uppercase; }
.run_detail_total_item span:last-child { font-size: 1.1rem; font-weight: 700; color: #111827; }
.detail_section_title { font-size: .8rem; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .04em; margin: 1rem 0 .4rem; border-bottom: 1px solid var(--border-color, #e5e7eb); padding-bottom: .3rem; }

.payroll_formula_note { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: #6b7280; margin-top: .5rem; }
.payroll_formula_note svg { width: 14px; height: 14px; flex-shrink: 0; }

.commission_badge { display: inline-flex; align-items: center; background: #eff6ff; color: #1d4ed8; border-radius: 4px; padding: .15rem .4rem; font-size: .75rem; font-weight: 700; }

th.extra_long, td.extra_long { min-width: 180px; }

/* =====================================================================
   AREA CHECKBOXES � multi-role employee form
   ===================================================================== */
.area_checkboxes_wrapper { display: flex; flex-wrap: wrap; gap: .5rem .75rem; padding: .4rem 0; }
.area_checkboxes_wrapper::after { display: none; }
.area_checkbox_label { display: flex; align-items: center; gap: .35rem; font-size: .85rem; cursor: pointer; }
.area_checkbox_label input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary, #2d6cdf); cursor: pointer; }

/* =====================================================================
   BALANCE PAGE — Ingresos vs Egresos
   ===================================================================== */
.balance_summary_cards { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.balance_card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: .9rem 1.1rem; flex: 1 1 180px; min-width: 160px; }
.balance_card_icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.balance_card_icon svg { width: 18px; height: 18px; }
.balance_card_body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.balance_card_label { font-size: .72rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.balance_card_value { font-size: 1.2rem; font-weight: 700; color: #111827; }
.balance_card_value.positive { color: #15803d; }
.balance_card_value.negative { color: #dc2626; }
.balance_card--income       { border-left: 3px solid #10b981; }
.balance_card--income       .balance_card_icon { background: #f0fdf4; color: #15803d; }
.balance_card--expense      { border-left: 3px solid #ef4444; }
.balance_card--expense      .balance_card_icon { background: #fef2f2; color: #dc2626; }
.balance_card--net          { border-left: 3px solid #2563eb; }
.balance_card--net          .balance_card_icon { background: #eff6ff; color: #1d4ed8; }
.balance_card--income-sub   { border-left: 3px solid #6ee7b7; }
.balance_card--income-sub   .balance_card_icon { background: #f0fdf4; color: #15803d; }
.balance_card--expense-sub  { border-left: 3px solid #fca5a5; }
.balance_card--expense-sub  .balance_card_icon { background: #fef2f2; color: #dc2626; }

/* ── Tabla resumen semanal ─────────────────────────────────────────────────── */
.bal_weekly_table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bal_weekly_table thead th { background: #3b82f6; color: #fff; font-weight: 700; text-align: center; padding: .45rem .75rem; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.bal_weekly_table thead th:first-child,
.bal_weekly_table thead th:last-child { background: transparent; }
.bal_weekly_table td { padding: .45rem .75rem; border: 1px solid #d1d5db; }
.bal_label { font-weight: 700; font-size: .8rem; text-transform: uppercase; color: #1e3a5f; background: #dbeafe; text-align: center; letter-spacing: .04em; }
.bal_label_right { background: #dbeafe; }
.bal_val { text-align: right; font-weight: 600; color: #111827; background: #fff; min-width: 110px; }
.bal_row_semana .bal_cell_semana { background: #a5f3e8; color: #065f46; }
.bal_row_ahorro  .bal_cell_ahorro  { background: #f9a8d4; color: #831843; }
.bal_row_total   .bal_label  { background: #bbf7d0; color: #14532d; }
.bal_row_total   .bal_cell_total { background: #bbf7d0; color: #14532d; font-weight: 800; }
.bal_neto_cell { display: inline-block; min-width: 160px; padding: .55rem 1.5rem; font-size: 1.1rem; font-weight: 800; border-radius: 6px; border: 2px solid #ca8a04; background: #fef08a; color: #713f12; letter-spacing: .03em; }
.bal_neto_positive { background: #fef08a; color: #713f12; border-color: #ca8a04; }
.bal_neto_negative { background: #fecaca; color: #7f1d1d; border-color: #ef4444; }

/* =====================================================================
   CIERRE DE SEMANA PAGE
   ===================================================================== */
.cierre_summary_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-top: 1rem; }
.cierre_card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: .8rem 1rem; min-width: 150px; }
.cierre_card_icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cierre_card_icon svg { width: 16px; height: 16px; }
.cierre_card_body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cierre_card_label { font-size: .68rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.cierre_card_value { font-size: 1.05rem; font-weight: 700; color: #111827; }
.cierre_card_sub { font-size: .7rem; color: #9ca3af; }
.cierre_card--income  { border-left: 3px solid #10b981; }
.cierre_card--income  .cierre_card_icon { background: #f0fdf4; color: #15803d; }
.cierre_card--expense { border-left: 3px solid #ef4444; }
.cierre_card--expense .cierre_card_icon { background: #fef2f2; color: #dc2626; }
.cierre_card--net     { border-left: 3px solid #2563eb; }
.cierre_card--net     .cierre_card_icon { background: #eff6ff; color: #1d4ed8; }
.cierre_net_value.cierre_net_positive { color: #15803d; }
.cierre_net_value.cierre_net_negative { color: #dc2626; }

.cierre_totals_row { display: flex; gap: 1rem; margin-top: 1rem; justify-content: center; }
.cierre_total_box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .6rem 1.5rem; border-radius: 10px; min-width: 180px; }
.cierre_total_box--green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cierre_total_box--red   { background: #fef2f2; border: 1px solid #fecaca; }
.cierre_total_label { font-size: .72rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.cierre_total_value { font-size: 1.3rem; font-weight: 800; }
.cierre_total_box--green .cierre_total_value { color: #15803d; }
.cierre_total_box--red   .cierre_total_value { color: #dc2626; }

.cierre_detail_sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; margin-top: 1rem; }
.cierre_detail_card { background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; padding: .75rem 1rem; }
.cierre_detail_card h5 { margin: 0 0 .5rem; }

/* ── Portal Clientes ───────────────────────────────────────────────────────── */
.portal_body { background: #f0f4f8; font-family: 'Poppins', sans-serif; margin: 0; min-height: 100vh; }

/* Login */
.portal_login_wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.portal_login_card { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.1); padding: 2.5rem 2rem; width: 100%; max-width: 420px; }
.portal_logo { width: 130px; display: block; margin: 0 auto 1.25rem; }
.portal_login_title { font-size: 1.4rem; font-weight: 700; color: #1e3a5f; text-align: center; margin: 0 0 .25rem; }
.portal_login_sub { font-size: .82rem; color: #6b7280; text-align: center; margin: 0 0 1.75rem; }
.portal_tabs { display: flex; gap: 0; margin-bottom: 1.25rem; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.portal_tab { flex: 1; padding: .55rem .75rem; border: none; background: #f9fafb; color: #6b7280; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.portal_tab--active { background: #1e3a5f; color: #fff; }
.portal_otp_hint { font-size: .83rem; color: #374151; margin-bottom: 1rem; }
.portal_otp_input { font-size: 1.5rem; letter-spacing: .4rem; text-align: center; font-weight: 700; }
.portal_error { color: #dc2626; font-size: .8rem; margin-top: .35rem; padding: .4rem .6rem; background: #fef2f2; border-radius: 6px; border: 1px solid #fecaca; }
.portal_loading { display: flex; justify-content: center; padding: 1.5rem 0; }
.portal_spinner { width: 36px; height: 36px; border: 3px solid #e5e7eb; border-top-color: #2563eb; border-radius: 50%; animation: portalSpin .7s linear infinite; }
@keyframes portalSpin { to { transform: rotate(360deg); } }

/* Header */
.portal_header { background: #1e3a5f; padding: .85rem 1.5rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.portal_header_logo { height: 36px; }
.portal_header_right { display: flex; align-items: center; gap: .75rem; }
.portal_header_name { color: #e2e8f0; font-size: .85rem; font-weight: 500; }

/* Main */
.portal_main { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.portal_section { margin-bottom: 2rem; }
.portal_section_title { font-size: 1rem; font-weight: 700; color: #1e3a5f; margin: 0 0 .85rem; padding-bottom: .4rem; border-bottom: 2px solid #dbeafe; }
.portal_empty { color: #9ca3af; font-size: .85rem; text-align: center; padding: 1.5rem 0; }

/* Cards */
.portal_card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.07); padding: 1.25rem; margin-bottom: 1rem; }
.portal_card_header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: .5rem; }
.portal_card_title { font-size: 1rem; font-weight: 700; color: #111827; }
.portal_card_sub { font-size: .75rem; color: #6b7280; margin-top: .1rem; }

/* Badges */
.portal_badge { font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 20px; white-space: nowrap; }
.portal_badge--success { background: #dcfce7; color: #15803d; }
.portal_badge--danger  { background: #fee2e2; color: #dc2626; }
.portal_badge--blue    { background: #dbeafe; color: #1d4ed8; }

/* Stats grid */
.portal_stats_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.portal_stat { background: #f8fafc; border-radius: 8px; padding: .6rem .8rem; }
.portal_stat--danger { background: #fef2f2; }
.portal_stat_label { display: block; font-size: .7rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.portal_stat_val { display: block; font-size: .95rem; font-weight: 700; color: #111827; }
.portal_stat--danger .portal_stat_val { color: #dc2626; }

/* Progress */
.portal_progress_wrap { background: #e5e7eb; border-radius: 99px; height: 8px; overflow: hidden; margin-bottom: .35rem; }
.portal_progress_bar { height: 100%; background: #10b981; border-radius: 99px; transition: width .4s; }
.portal_progress_bar--blue { background: #2563eb; }
.portal_progress_label { font-size: .72rem; color: #6b7280; margin-bottom: .75rem; }

/* Details / table */
.portal_details { margin-top: .5rem; }
.portal_details summary { font-size: .8rem; color: #2563eb; cursor: pointer; font-weight: 600; padding: .35rem 0; }
.portal_table_wrap { overflow-x: auto; margin-top: .5rem; }
.portal_table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.portal_table th { background: #f1f5f9; color: #374151; font-weight: 700; padding: .4rem .6rem; text-align: left; }
.portal_table td { padding: .4rem .6rem; border-bottom: 1px solid #f1f5f9; color: #374151; }
.portal_pay_row--paid    td { color: #15803d; }
.portal_pay_row--overdue td { color: #dc2626; font-weight: 600; }
.portal_pay_status { font-weight: 600; }

/* ── ONEPAGE CRÉDITO ── */
.onepage_container {
  max-width: 900px;
  margin: 0 auto;
}

.onepage_steps {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
  background: var(--clr-gray, #f0f2f5);
  border-radius: 10px;
  padding: 6px;
  overflow-x: auto;
}

.onepage_steps .step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--clr-text-offwhite, #999);
  white-space: nowrap;
  transition: all 0.2s;
  cursor: default;
  background: transparent;
}

.onepage_steps .step.active {
  background: var(--bs-primary, #3b7ddd);
  color: #fff;
}

.onepage_steps .step.completed {
  color: var(--clr-cta-green, #34c99c);
}

.step_num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--clr-secondary, #ddd);
  color: #666;
}

.step.active .step_num {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.onepage_section {
  animation: fadeIn 0.25s ease;
}

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

.onepage_footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 12px;
}

.field_group.divider_text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0;
  color: var(--clr-text-offwhite, #999);
  font-size: 0.85rem;
}

.field_group.divider_text::before,
.field_group.divider_text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--clr-secondary, #ddd);
}

.selected_list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5rem 0;
}

.selected_item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-gray, #eef0f2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Signature Pad */
.signature_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 1rem 0;
}

.signature_canvas {
  width: 100%;
  max-width: 600px;
  height: 200px;
  border: 2px dashed var(--clr-secondary, #ccc);
  border-radius: 8px;
  cursor: crosshair;
  background: #fff;
  touch-action: none;
}

.signature_actions {
  display: flex;
  gap: 8px;
}

.signature_preview {
  text-align: center;
  margin-top: 1rem;
}

/* Responsive onepage */
@media (max-width: 768px) {
  .onepage_steps {
    gap: 2px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .onepage_steps .step {
    padding: 8px 6px;
    font-size: 0.65rem;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 60px;
  }
  .step_num {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }
  .onepage_container {
    padding: 0 4px;
  }
  .onepage_footer {
    flex-direction: column;
    gap: 8px;
  }
  .onepage_footer button {
    width: 100%;
    justify-content: center;
  }
  .signature_canvas {
    height: 150px;
  }
  .selected_list {
    flex-direction: column;
  }
  .selected_item {
    width: 100%;
    justify-content: space-between;
  }
  #opNewGuarantorFields .field_group_divided {
    flex-direction: column;
  }
  .field_group.divider_text {
    font-size: 0.75rem;
  }
  .field_group_divided.align_end {
    flex-direction: column;
    align-items: stretch;
  }
  .field_group_divided.align_end .field_wrapper {
    width: 100%;
  }
  .field_group_divided.align_end button {
    align-self: flex-end;
    margin-top: 4px;
  }
}

/* Renewal banner */
.renewal_banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .onepage_steps .step {
    min-width: 50px;
    padding: 6px 4px;
    font-size: 0.6rem;
  }
  .step_num {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
  }
}
