* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #111;
}

.topbar {
    height: 88px;
    background: #cbb56b;
    display: flex;
    align-items: center;  
    justify-content: space-between;
    padding: 0 40px;
}

.topbar-title {
    font-size: 24px;
    font-weight: 500;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user-name {
    font-size: 14px;
}

.topbar-user-icon {
    font-size: 24px;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 88px);
}

.sidebar {
    width: 300px;
    background: #eeeeee;
    border-right: 1px solid #c9c9c9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link,
.sidebar-sublink {
    text-decoration: none;
    color: #111;
    display: block;
}

.sidebar-link {
    padding: 22px 28px;
    font-size: 18px;
    border-bottom: 1px solid #c9c9c9;
}

.sidebar-section {
    border-bottom: 1px solid #c9c9c9;
}

.sidebar-section-title {
    padding: 22px 28px;
    font-size: 18px;
    font-weight: 700;
    background: #dddddd;
}

.sidebar-sublink {
    padding: 18px 28px 18px 50px;
    font-size: 16px;
}

.sidebar-sublink:hover,
.sidebar-link:hover {
    background: #d3d3d3;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-icon {
    width: 24px;
    text-align: center;
    font-size: 21px;
    font-weight: normal;
}

.sidebar-arrow {
    font-size: 25px;
    font-weight: normal;
}

.sidebar-submenu {
    background: #eeeeee;
}

.sidebar-link.active,
.sidebar-sublink.active {
    font-weight: 700;
    background: #cccccc;
}

.sidebar-submenu {
    display: none;
}

.sidebar-section.open .sidebar-submenu {
    display: block;
}

.sidebar-toggle {
    width: 100%;
    border: none;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.sidebar-arrow {
    transition: transform 0.2s ease;
}

.sidebar-section.open .sidebar-arrow {
    transform: rotate(90deg);
}

.sidebar-arrow {
    transition: transform 0.2s ease;
}

.sidebar-section.open .sidebar-arrow {
    transform: rotate(90deg);
}

.deudas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
    width: 100%;
}

.deudas-toolbar-left {
    display: flex;
    align-items: center;
    gap: 26px;
}

.deudas-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deudas-search-form label {
    font-size: 16px;
    font-weight: 600;
}

.deudas-search-form input[type="text"] {
    width: 280px;
    height: 48px;
    border: 1px solid #bdbdbd;
    padding: 0 12px;
    font-size: 15px;
}

.btn-primary,
.btn-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary {
    background: #20a9d2;
    color: #ffffff;
}

.btn-excel {
    background: #1dbb45;
    color: #ffffff;
}

.btn-primary:hover,
.btn-excel:hover {
    opacity: 0.9;
}

.deudas-content {
    width: fit-content;
    max-width: 100%;
}

.btn-clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111;
    font-size: 16px;
    font-weight: 600;
}

.btn-clear-filter-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8a8a8a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.btn-clear-filter:hover {
    opacity: 0.8;
}

.deudas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.deudas-table th,
.deudas-table td {
    border: 1px solid #c7c7c7;
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}

.deudas-table th:nth-child(10),
.deudas-table td:nth-child(10) {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.table-action img {
    width: 26px;
    height: 26px;
    display: block;
}

.deudas-table th {
    background: #ffffff;
    font-weight: 500;
}

.deudas-table tbody tr:nth-child(odd) {
    background: #f3f3f3;
}

.deudas-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.deudas-table td {
    line-height: 1.25;
}


.table-sort {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.table-sort-arrow {
    font-size: 14px;
}

.table-sort-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.sort-up,
.sort-down {
    width: 0;
    height: 0;
    opacity: 0.35;
}

.sort-up {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #111;
}

.sort-down {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #111;
}

.sort-up.active,
.sort-down.active {
    opacity: 1;
}

.sidebar-icon img {
    width: 26px;
    height: 26px;
    display: block;
}

.afiliados-content {
    width: 100%;
    max-width: 1410px;
}

.afiliados-table {
    width: 100%;
}

.afiliados-table .table-actions {
    justify-content: flex-start;
}

.detalle-afiliado-content {
    max-width: 900px;
}

.detalle-afiliado-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.detalle-afiliado-content h2 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 18px;
}

.detalle-afiliado-content p {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 48px;
    padding: 0 24px;
    background: #777777;
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
}

.btn-secondary:hover {
    opacity: 0.9;
}

.detalle-afiliado-nombre {
    margin: -10px 0 28px;
    font-size: 28px;
    font-weight: 700;
    color: #cbb56b;
}

.editar-afiliado-content {
    max-width: 900px;
}

.editar-afiliado-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.editar-afiliado-content fieldset {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.editar-afiliado-content legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.editar-afiliado-content label {
    font-weight: 600;
}

.editar-afiliado-content input,
.editar-afiliado-content select,
.editar-afiliado-content textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    font-family: inherit;
    font-size: 15px;
}

.editar-afiliado-content textarea {
    resize: vertical;
}

.editar-afiliado-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
    margin-bottom: 12px;
}

.detalle-afiliado-section {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.detalle-afiliado-section legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.detalle-afiliado-row {
    margin: 14px 0;
    font-size: 16px;
    line-height: 1.5;
}

.detalle-afiliado-row strong {
    display: inline-block;
    min-width: 130px;
}

.detalle-deuda-content {
    max-width: 900px;
}

.detalle-deuda-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.detalle-deuda-nombre {
    margin: -10px 0 28px;
    font-size: 28px;
    font-weight: 700;
    color: #cbb56b;
}

.detalle-deuda-section {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.detalle-deuda-section legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.detalle-deuda-row {
    margin: 14px 0;
    font-size: 16px;
    line-height: 1.5;
}

.detalle-deuda-row strong {
    display: inline-block;
    min-width: 160px;
}

.detalle-deuda-documentos {
    margin: 0;
    padding-left: 20px;
}

.detalle-deuda-documentos li {
    margin-bottom: 18px;
    line-height: 1.5;
}

.editar-deuda-content {
    max-width: 900px;
}

.editar-deuda-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.editar-deuda-content fieldset {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.editar-deuda-content legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.editar-deuda-content label {
    font-weight: 600;
}

.editar-deuda-content input,
.editar-deuda-content select,
.editar-deuda-content textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    font-family: inherit;
    font-size: 15px;
}

.editar-deuda-content textarea {
    resize: vertical;
}.editar-deuda-content {
    max-width: 900px;
}

.editar-deuda-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.editar-deuda-content fieldset {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.editar-deuda-content legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.editar-deuda-content label {
    font-weight: 600;
}

.editar-deuda-content input,
.editar-deuda-content select,
.editar-deuda-content textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    font-family: inherit;
    font-size: 15px;
}

.editar-deuda-content textarea {
    resize: vertical;
}

.editar-deuda-content input[type="file"] {
    display: block;
    margin-top: 8px;
}

.crear-deuda-content {
    max-width: 900px;
}

.crear-deuda-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.crear-deuda-content fieldset {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.crear-deuda-content legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.crear-deuda-content label {
    font-weight: 600;
}

.crear-deuda-content input,
.crear-deuda-content select,
.crear-deuda-content textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    font-family: inherit;
    font-size: 15px;
}

.crear-deuda-content textarea {
    resize: vertical;
}

.crear-deuda-content input[type="file"] {
    display: block;
    margin-top: 8px;
    margin-bottom: 18px;
}

/* =========================================================
   INICIO ADMINISTRADOR
   ========================================================= */

.admin-inicio-content {
    width: 100%;
}

.admin-inicio-content h1 {
    font-size: 28px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 14px;
}

.admin-inicio-cards {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.admin-inicio-card {
    width: 205px;
    height: 205px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 7px;
    box-shadow: 2px 3px 3px rgba(0, 0, 0, 0.20);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    color: #111111;

    font-size: 22px;
    line-height: 1.15;
    text-align: center;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.admin-inicio-card-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}

.admin-inicio-card:hover {
    transform: translateY(-2px);
    box-shadow: 3px 5px 6px rgba(0, 0, 0, 0.22);
}

.crear-afiliado-content {
    max-width: 900px;
}

.crear-afiliado-content h1 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
}

.crear-afiliado-content fieldset {
    border: 1px solid #d2d2d2;
    padding: 22px;
    margin-bottom: 24px;
}

.crear-afiliado-content legend {
    font-size: 20px;
    font-weight: 700;
    padding: 0 8px;
}

.crear-afiliado-content label {
    font-weight: 600;
}

.crear-afiliado-content input,
.crear-afiliado-content select,
.crear-afiliado-content textarea {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    font-family: inherit;
    font-size: 15px;
}

.crear-afiliado-content textarea {
    resize: vertical;
}

/* LOGIN */

.login-page {
    font-family: Arial, Helvetica, sans-serif;
}

.login-topbar {
    height: 200px;
    background: #cbb56b;
}

.login-main {
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 320px;
    transform: translateY(-180px);
}

.login-box h1 {
    font-size: 28px;
}

.login-box button {
    background: #cbb56b;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-family: inherit;
    cursor: pointer;
}

/* =========================================================
   MENÚ DE USUARIO
   ========================================================= */

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-menu {
    position: relative;
}

.topbar-user-button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.topbar-user-image {
    width: 30px;
    height: 30px;
    display: block;
}

.topbar-user-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #111111;
}

.topbar-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 145px;
    background: #ffffff;
    border: 1px solid #c9c9c9;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    z-index: 1000;
}

.topbar-user-dropdown.open {
    display: block;
}

.topbar-user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.topbar-user-dropdown a:hover {
    background: #eeeeee;
}

.main-content {
    flex: 1;
    background: #ffffff;
    padding: 32px;
    overflow-x: auto;
}