/* ==========================================================================
   RUES · Sistema visual reutilizable
   Guía de estilos: GUIA-ESTILOS-RUES.md
   ========================================================================== */

:root {
    --rues-navy-900: #022a56;
    --rues-navy: #034a9b;
    --rues-blue: #0578be;
    --rues-sky: #28a9e6;
    --rues-yellow: #ffde14;
    --rues-lime: #bccf21;
    --rues-ink: #0b2e4f;
    --rues-text: #40556b;
    --rues-muted: #6b7f94;
    --rues-line: #dce7f2;
    --rues-soft: #f4f7fb;
    --rues-soft-2: #eef4fa;
    --rues-white: #ffffff;

    --rues-radius: 18px;
    --rues-shadow: 0 20px 50px rgba(4, 44, 92, 0.12);
    --rues-shadow-sm: 0 8px 22px rgba(4, 44, 92, 0.09);

    --rues-font: "Titillium Web", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body.rues-app {
    margin: 0;
    min-height: 100vh;
    background: var(--rues-soft);
    color: var(--rues-text);
    font-family: var(--rues-font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.rues-app *,
.rues-app *::before,
.rues-app *::after {
    box-sizing: border-box;
}

.rues-app h1,
.rues-app h2,
.rues-app h3,
.rues-app h4,
.rues-app h5,
.rues-app h6 {
    margin: 0;
    color: var(--rues-ink);
    font-family: var(--rues-font);
    line-height: 1.2;
}

.rues-app p {
    margin: 0 0 14px;
}

.rues-app a {
    color: var(--rues-blue);
    font-family: var(--rues-font);
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.rues-app a:hover,
.rues-app a:focus {
    color: var(--rues-navy);
    background: transparent;
    text-decoration: none;
}

.rues-app img {
    max-width: 100%;
    height: auto;
}

.rues-app button,
.rues-app input,
.rues-app select,
.rues-app textarea {
    font-family: var(--rues-font);
}

.rues-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.rues-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.rues-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--rues-line);
    box-shadow: 0 4px 18px rgba(4, 44, 92, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rues-header__inner {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 1180px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 24px;
}

.rues-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.rues-brand img {
    display: block;
    width: 174px;
    height: auto;
}

.rues-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.rues-nav a {
    position: relative;
    padding: 8px 0;
    color: var(--rues-text);
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rues-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--rues-blue);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.2s ease;
}

.rues-nav a:hover,
.rues-nav a:focus {
    color: var(--rues-navy);
}

.rues-nav a:hover::after,
.rues-nav a:focus::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.rues-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0578be, #034a9b);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(3, 74, 155, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.rues-header__cta:hover,
.rues-header__cta:focus {
    color: #fff;
    background: linear-gradient(135deg, #0686d3, #03559f);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(3, 74, 155, 0.28);
}

.rues-header__cta:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(5, 120, 190, 0.28), 0 12px 24px rgba(3, 74, 155, 0.28);
}

.rues-header__user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--rues-muted);
    font-size: 13.5px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.rues-hero {
    position: relative;
    overflow: hidden;
    padding: 62px 0 132px;
    background: linear-gradient(118deg, #022a56 0%, #034a9b 54%, #0a7cc1 100%);
    color: #fff;
}

.rues-hero::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -220px;
    width: 520px;
    height: 520px;
    border: 70px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.rues-hero__decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(40, 169, 230, 0.28), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(255, 222, 20, 0.14), transparent 28%),
        radial-gradient(circle at 70% 92%, rgba(188, 207, 33, 0.12), transparent 30%);
}

.rues-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
}

.rues-hero__copy {
    min-width: 0;
}

.rues-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rues-eyebrow__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rues-lime);
    box-shadow: 0 0 0 4px rgba(188, 207, 33, 0.2);
}

.rues-hero h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.rues-hero h1 span {
    color: var(--rues-yellow);
}

.rues-hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    line-height: 1.65;
}

.rues-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13.5px;
    font-weight: 600;
}

.rues-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rues-hero__meta i {
    color: var(--rues-yellow);
    font-size: 15px;
}

.rues-hero__panel {
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 44px rgba(0, 16, 40, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rues-hero__panel-title {
    margin-bottom: 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rues-hero__panel ul {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rues-hero__panel li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 0;
    color: #fff;
}

.rues-hero__panel li > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--rues-yellow);
    font-size: 15px;
}

.rues-hero__panel strong {
    display: block;
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
}

.rues-hero__panel span {
    display: block;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    line-height: 1.45;
}

.rues-hero--compact {
    padding: 46px 0 102px;
}

.rues-hero--compact h1 {
    font-size: 36px;
}

.rues-hero--compact p {
    max-width: 720px;
}

/* --------------------------------------------------------------------------
   Main y tarjetas
   -------------------------------------------------------------------------- */

.rues-main {
    position: relative;
    z-index: 2;
    margin-top: -82px;
    padding-bottom: 60px;
}

.rues-app #acceso,
.rues-app #filtros,
.rues-app #resultados {
    scroll-margin-top: 96px;
}

.rues-main--flush {
    margin-top: 0;
    padding-top: 40px;
}

.rues-card,
.rues-legal-card {
    overflow: hidden;
    border: 1px solid #e1eaf3;
    border-radius: 20px;
    background: var(--rues-white);
    box-shadow: var(--rues-shadow);
}

.rues-card__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 30px;
    border-bottom: 1px solid #e6eff7;
    background: linear-gradient(120deg, #f8fbfe 0%, #eef5fb 100%);
}

.rues-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0578be, #034a9b);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(3, 74, 155, 0.2);
}

.rues-card__heading {
    flex: 1 1 260px;
    min-width: 0;
}

.rues-card__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--rues-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rues-card__heading h2 {
    margin: 0;
    color: var(--rues-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.rues-card__heading p {
    margin: 5px 0 0;
    color: var(--rues-muted);
    font-size: 14px;
}

.rues-card__head .rues-back {
    margin-left: auto;
}

.rues-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--rues-line);
    border-radius: 999px;
    background: #fff;
    color: var(--rues-navy);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.rues-back:hover,
.rues-back:focus {
    border-color: #b9cee2;
    color: var(--rues-blue);
    box-shadow: var(--rues-shadow-sm);
    text-decoration: none;
}

.rues-wizard {
    padding: 26px 28px 28px;
}

.rues-wizard__intro {
    color: var(--rues-text);
    font-size: 15px;
    line-height: 1.65;
}

.rues-wizard__intro strong {
    color: var(--rues-ink);
}

.rues-wizard__title {
    margin: 0 0 18px;
    color: var(--rues-ink);
    font-size: 18px;
    font-weight: 700;
}

.rues-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--rues-ink);
    font-size: 16px;
    font-weight: 700;
}

.rues-section-title i {
    color: var(--rues-blue);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.rues-btn,
.rues-app input.rues-btn,
.rues-app button.rues-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0578be, #034a9b);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(3, 74, 155, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.rues-btn:hover,
.rues-app input.rues-btn:hover,
.rues-app button.rues-btn:hover {
    background: linear-gradient(135deg, #0686d3, #03559f);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(3, 74, 155, 0.28);
}

.rues-btn:focus,
.rues-app input.rues-btn:focus,
.rues-app button.rues-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(5, 120, 190, 0.28), 0 14px 28px rgba(3, 74, 155, 0.24);
}

.rues-btn:disabled,
.rues-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rues-btn--ghost {
    border: 1px solid #cfddeb;
    background: #fff;
    color: var(--rues-navy);
    box-shadow: none;
}

.rues-btn--ghost:hover,
.rues-btn--ghost:focus {
    border-color: #b9cee2;
    background: var(--rues-soft-2);
    color: var(--rues-blue);
    box-shadow: none;
}

.rues-btn--soft {
    border: 1px solid var(--rues-line);
    background: var(--rues-soft-2);
    color: var(--rues-navy);
    box-shadow: none;
}

.rues-btn--soft:hover,
.rues-btn--soft:focus {
    border-color: #b9cee2;
    background: #e6f0f9;
    color: var(--rues-blue);
    box-shadow: none;
}

.rues-btn--sm {
    min-height: 38px;
    padding: 0 18px;
    font-size: 13.5px;
}

.rues-btn--block {
    width: 100%;
}

.rues-btn--icon {
    width: 46px;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */

.rues-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
}

.rues-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rues-form-grid--1 {
    grid-template-columns: minmax(0, 1fr);
}

.rues-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 7px;
}

.rues-field label,
.rues-field__label {
    color: var(--rues-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.rues-field label .req,
.rues-field__label .req {
    color: #d64545;
}

.rues-field__hint {
    margin: 0;
    color: var(--rues-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.rues-input,
.rues-select,
.rues-textarea {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #cfddeb;
    border-radius: 10px;
    background: #fff;
    color: var(--rues-ink);
    font-family: var(--rues-font);
    font-size: 15px;
    line-height: 1.3;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.rues-textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

.rues-select {
    padding-right: 40px;
    background-image: linear-gradient(45deg, transparent 50%, var(--rues-muted) 50%),
        linear-gradient(135deg, var(--rues-muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
}

.rues-input::placeholder,
.rues-textarea::placeholder {
    color: #93a6b8;
}

.rues-input:hover,
.rues-select:hover,
.rues-textarea:hover {
    border-color: #b9cee2;
}

.rues-input:focus,
.rues-select:focus,
.rues-textarea:focus {
    border-color: var(--rues-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(5, 120, 190, 0.14);
    outline: 0;
}

.rues-input:disabled,
.rues-input[disabled],
.rues-select:disabled,
.rues-select[disabled],
.rues-textarea:disabled {
    border-color: #e0e9f2;
    background-color: #f7fafd;
    color: var(--rues-muted);
    cursor: not-allowed;
}

.rues-input.is-invalid,
.rues-select.is-invalid {
    border-color: #d64545;
    box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.12);
}

.rues-consent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 24px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--rues-line);
}

.rues-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--rues-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    cursor: pointer;
}

.rues-check input[type="checkbox"],
.rues-check input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--rues-navy);
    cursor: pointer;
}

.rues-check span {
    min-width: 0;
}

.show_terms,
.show_politics {
    color: var(--rues-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.show_terms:hover,
.show_politics:hover {
    color: var(--rues-navy);
}

.rues-app .go_home {
    cursor: pointer;
}

.rues-app span.go_home {
    color: var(--rues-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rues-app span.go_home:hover {
    color: var(--rues-navy);
}

.rues-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.rues-form-actions--split {
    justify-content: space-between;
}

.rues-delivery {
    display: grid;
    gap: 14px;
    margin: 4px 0 0;
}

.rues-delivery__row {
    display: grid;
    grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.rues-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rues-muted);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Progreso por pasos
   -------------------------------------------------------------------------- */

.rues-wizard .containerPG_ {
    width: 100%;
    margin: 22px auto 26px;
}

.rues-wizard .progressbar {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.rues-wizard .progressbar li {
    position: relative;
    float: none;
    flex: 1 1 0;
    width: auto;
    padding: 0 8px;
    color: var(--rues-muted);
    font-family: var(--rues-font);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.rues-wizard .progressbar li::before {
    content: counter(step);
    counter-increment: step;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 10px;
    border: 2px solid #bfd2e3;
    border-radius: 50%;
    background: #fff;
    color: var(--rues-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rues-wizard .progressbar li::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 19px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #dce7f2;
}

.rues-wizard .progressbar li:first-child::after {
    content: none;
}

.rues-wizard .progressbar li.active {
    color: var(--rues-navy);
}

.rues-wizard .progressbar li.active::before {
    border-color: var(--rues-navy);
    background: var(--rues-navy);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(3, 74, 155, 0.12);
}

.rues-wizard .progressbar li.visit {
    color: #2f7d32;
}

.rues-wizard .progressbar li.visit::before {
    border-color: #7cb57f;
    background: #eef8ee;
    color: #2f7d32;
}

.rues-wizard .progressbar li.active + li::after,
.rues-wizard .progressbar li.visit + li::after {
    background: var(--rues-navy);
}

.rues-wizard .progressbar span {
    color: inherit;
}

/* --------------------------------------------------------------------------
   Pestañas
   -------------------------------------------------------------------------- */

.rues-tabs.nav-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
}

.rues-tabs.nav-tabs > li {
    float: none;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.rues-tabs.nav-tabs > li > a,
.rues-tabs.nav-tabs > li > a:link,
.rues-tabs.nav-tabs > li > a:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-top: 3px solid transparent;
    border-radius: 12px;
    background: #f2f7fc;
    color: var(--rues-muted);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rues-tabs.nav-tabs > li > a:hover,
.rues-tabs.nav-tabs > li > a:focus {
    background: #e9f2fa;
    color: var(--rues-navy);
    text-decoration: none;
}

.rues-tabs.nav-tabs > li.active > a,
.rues-tabs.nav-tabs > li.active > a:hover,
.rues-tabs.nav-tabs > li.active > a:focus {
    border-color: #e1eaf3;
    border-top-color: var(--rues-navy);
    background: #fff;
    color: var(--rues-navy);
    box-shadow: var(--rues-shadow-sm);
}

.rues-tabs.nav-tabs > li.visit > a {
    border-color: #dcefdc;
    border-top-color: #7cb57f;
    background: #eef8ee;
    color: #2f7d32;
}

.rues-tabs.nav-tabs > li > a i {
    font-size: 14px;
}

.rues-tab-content > .tab-pane {
    display: none;
}

.rues-tab-content > .tab-pane.active {
    display: block;
    animation: rues-fade-in 0.24s ease;
}

@keyframes rues-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Alertas
   -------------------------------------------------------------------------- */

.rues-card .alert,
.rues-legal-card .alert,
.rues-alert-stack .alert {
    position: relative;
    margin: 18px 0 0;
    padding: 16px 46px 16px 18px;
    border: 0;
    border-left: 4px solid var(--rues-line);
    border-radius: 12px;
    background: var(--rues-soft-2);
    color: var(--rues-text);
    font-family: var(--rues-font);
    font-size: 14px;
    line-height: 1.55;
}

.rues-card .alert p,
.rues-legal-card .alert p,
.rues-alert-stack .alert p {
    margin: 10px 0 0;
}

.rues-card .alert strong,
.rues-legal-card .alert strong,
.rues-alert-stack .alert strong {
    color: inherit;
}

.rues-card .alert-warning,
.rues-alert-stack .alert-warning {
    border-left-color: #d64545;
    background: #fdeeee;
    color: #6d2323;
}

.rues-card .alert-info,
.rues-alert-stack .alert-info {
    border-left-color: #e0a800;
    background: #fff7e2;
    color: #6f5300;
}

.rues-card .alert-success,
.rues-alert-stack .alert-success {
    border-left-color: #3f8f45;
    background: #eef8ee;
    color: #245c28;
}

.rues-card .alert .close,
.rues-legal-card .alert .close,
.rues-alert-stack .alert .close {
    position: absolute;
    top: 9px;
    right: 12px;
    margin: 0;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 20px;
    line-height: 1;
    opacity: 0.65;
    text-shadow: none;
    cursor: pointer;
}

.rues-card .alert .close:hover,
.rues-legal-card .alert .close:hover,
.rues-alert-stack .alert .close:hover {
    opacity: 1;
}

.icon-center {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.icon-center i {
    flex: 0 0 auto;
}

.icon-center strong {
    font-size: 15px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Tablas
   -------------------------------------------------------------------------- */

.rues-card table,
.rues-legal-card table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: var(--rues-text);
    font-family: var(--rues-font);
    font-size: 13.5px;
}

.rues-card table th,
.rues-legal-card table th {
    padding: 12px 14px;
    border-bottom: 1px solid #d6e4f0;
    background: #f2f7fc;
    color: var(--rues-navy);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.rues-card table td,
.rues-legal-card table td {
    padding: 11px 14px;
    border-bottom: 1px solid #e8f0f7;
    vertical-align: middle;
}

.rues-card table tbody tr:nth-child(even),
.rues-legal-card table tbody tr:nth-child(even) {
    background: #f9fbfd;
}

.rues-card table tbody tr:hover,
.rues-legal-card table tbody tr:hover {
    background: #eef5fb;
}

.rues-card .table-responsive,
.rues-legal-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   Página legal
   -------------------------------------------------------------------------- */

.rues-doc .rues-main {
    margin-top: -82px;
}

.rues-legal-intro {
    padding: 22px 30px 0;
    color: var(--rues-text);
    font-size: 15px;
    line-height: 1.65;
}

.rues-legal-body {
    padding: 18px 30px;
    color: var(--rues-text);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.rues-legal-body p,
.rues-legal-body div,
.rues-legal-body li {
    font-family: var(--rues-font);
    font-size: 15px;
    line-height: 1.7;
}

.rues-legal-body p {
    margin: 0 0 12px;
    text-align: justify;
}

.rues-legal-body p.MsoNormal,
.rues-legal-body li.MsoNormal {
    margin: 0 0 10px !important;
}

.rues-legal-body span {
    font-family: var(--rues-font) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.rues-legal-body strong {
    color: var(--rues-ink);
    font-weight: 700;
}

.rues-legal-body ul,
.rues-legal-body ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.rues-legal-body h1,
.rues-legal-body h2,
.rues-legal-body h3,
.rues-legal-body h4 {
    margin: 26px 0 12px;
    color: var(--rues-ink);
    font-weight: 700;
    line-height: 1.3;
}

.rues-legal-body h3 {
    font-size: 18px;
}

.rues-legal-body a {
    color: var(--rues-blue);
    text-decoration: underline;
}

.rues-legal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 30px 30px;
}

.rues-terms-panel {
    margin-top: 22px;
    border: 1px solid var(--rues-line);
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.rues-terms-panel .rues-legal-body {
    padding: 18px 20px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.rues-footer {
    padding: 28px 0;
    border-top: 1px solid var(--rues-line);
    background: #fff;
}

.rues-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px 32px;
}

.rues-footer__brand {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.rues-footer__brand img {
    width: 118px;
    height: auto;
    flex: 0 0 auto;
}

.rues-footer__brand span {
    max-width: 520px;
    color: var(--rues-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.rues-footer__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.rues-footer__links a {
    color: var(--rues-muted);
    font-size: 13.5px;
    font-weight: 600;
}

.rues-footer__links a:hover,
.rues-footer__links a:focus {
    color: var(--rues-blue);
}

.rues-footer__version {
    color: var(--rues-muted);
    font-size: 13px;
    font-weight: 600;
    padding-left: 22px;
    border-left: 1px solid var(--rues-line);
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.rues-dashboard .rues-main {
    padding-bottom: 56px;
}

.rues-dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 26px;
    margin-bottom: 22px;
    padding: 22px 28px;
    border: 1px solid #e1eaf3;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--rues-shadow-sm);
}

.rues-dashboard-toolbar__copy {
    min-width: 0;
}

.rues-dashboard-toolbar__copy h2 {
    margin: 0 0 4px;
    color: var(--rues-ink);
    font-size: 22px;
    font-weight: 700;
}

.rues-dashboard-toolbar__copy p {
    margin: 0;
    color: var(--rues-muted);
    font-size: 14px;
}

.rues-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--rues-line);
    border-radius: 999px;
    background: #fff;
    color: var(--rues-navy);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.rues-logout:hover,
.rues-logout:focus {
    border-color: #b9cee2;
    color: var(--rues-blue);
    box-shadow: var(--rues-shadow-sm);
}

.rues-filter-card .rues-card__head {
    padding: 20px 26px;
}

.rues-filter-card .rues-wizard {
    padding: 22px 26px 26px;
}

.rues-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 20px;
}

.rues-filter-grid .rues-field {
    min-width: 0;
}

.rues-filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--rues-line);
}

.rues-filter-actions > label,
.rues-filter-actions__label {
    margin: 0;
    color: var(--rues-muted);
    font-size: 13px;
    font-weight: 700;
}

.rues-filter-actions__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.rues-filter-actions__inner .rues-btn {
    min-width: 46px;
}

.rues-dashboard .bootstrap-select > .dropdown-toggle {
    min-height: 46px;
    padding: 0 34px 0 14px;
    border: 1px solid #cfddeb;
    border-radius: 10px;
    background: #fff;
    color: var(--rues-ink);
    font-size: 15px;
    font-family: var(--rues-font);
    box-shadow: none;
}

.rues-dashboard .bootstrap-select > .dropdown-toggle:hover {
    border-color: #b9cee2;
    background: #fff;
}

.rues-dashboard .bootstrap-select > .dropdown-toggle.bs-placeholder {
    color: var(--rues-muted);
}

.rues-dashboard .bootstrap-select > .dropdown-toggle:focus,
.rues-dashboard .bootstrap-select.show > .dropdown-toggle {
    border-color: var(--rues-blue) !important;
    box-shadow: 0 0 0 3px rgba(5, 120, 190, 0.14) !important;
    outline: 0 !important;
}

.rues-dashboard .bootstrap-select > .dropdown-toggle .filter-option {
    color: var(--rues-ink);
    font-size: 14px;
}

.rues-dashboard .bootstrap-select .dropdown-menu,
.rues-app .bootstrap-select .dropdown-menu,
.rues-app > .dropdown-menu {
    border: 1px solid var(--rues-line);
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(4, 44, 92, 0.16);
    padding: 6px;
}

.rues-dashboard .bootstrap-select .dropdown-menu li > a,
.rues-app .bootstrap-select .dropdown-menu li > a,
.rues-app > .dropdown-menu li > a {
    border-radius: 8px;
    font-size: 14px;
}

.rues-dashboard .bootstrap-select .dropdown-menu li.selected > a,
.rues-app .bootstrap-select .dropdown-menu li.selected > a,
.rues-app > .dropdown-menu li.selected > a {
    background: var(--rues-soft-2);
    color: var(--rues-navy);
}

.rues-dashboard .bootstrap-select .dropdown-menu li > a:hover,
.rues-dashboard .bootstrap-select .dropdown-menu li > a:focus,
.rues-app .bootstrap-select .dropdown-menu li > a:hover,
.rues-app .bootstrap-select .dropdown-menu li > a:focus,
.rues-app > .dropdown-menu li > a:hover,
.rues-app > .dropdown-menu li > a:focus {
    background: #e9f2fa;
    color: var(--rues-navy);
}

.rues-dashboard .rues-card .alert {
    margin-top: 16px;
}

.rues-dashboard .card,
.rues-dashboard .card.crypto {
    margin-bottom: 22px;
    border: 1px solid #e1eaf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--rues-shadow-sm);
    overflow: hidden;
}

.rues-dashboard .card > .row.ml-2,
.rues-dashboard .card .row.ml-2 {
    margin: 0 !important;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e8f0f7;
    background: linear-gradient(120deg, #f8fbfe 0%, #eef5fb 100%);
}

.rues-dashboard .card > .row.ml-2 label,
.rues-dashboard .card .row.ml-2 label {
    margin: 0;
    color: var(--rues-ink);
    font-size: 14px;
    font-weight: 700;
}

.rues-dashboard .card-body {
    padding: 18px 20px;
}

.rues-dashboard .table {
    margin-bottom: 0;
    color: var(--rues-text);
    font-size: 13px;
}

.rues-dashboard .table thead th {
    padding: 10px 12px;
    border-bottom: 1px solid #d6e4f0;
    background: #f2f7fc;
    color: var(--rues-navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: middle;
}

.rues-dashboard .table td {
    padding: 9px 12px;
    border-top: 1px solid #e8f0f7;
    vertical-align: middle;
}

.rues-dashboard .table-striped tbody tr:nth-of-type(odd) {
    background: #f9fbfd;
}

.rues-dashboard .table-hover tbody tr:hover {
    background: #eef5fb;
}

.rues-dashboard .table-bordered,
.rues-dashboard .table-bordered td,
.rues-dashboard .table-bordered th {
    border-color: #e1eaf3;
}

.rues-dashboard .market-values,
.rues-dashboard .transcation-scroll {
    border-radius: 10px;
}

.rues-dashboard .amcharts-legend-div {
    font-family: var(--rues-font) !important;
}

.rues-dashboard .rues-download-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding: 18px 22px;
    border: 1px solid #e1eaf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--rues-shadow-sm);
}

.rues-dashboard .rues-download-bar > span {
    color: var(--rues-text);
    font-size: 14px;
    font-weight: 600;
}

.rues-dashboard .rues-file-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.rues-dashboard .rues-file-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--rues-text);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.rues-dashboard .rues-file-options input[type="radio"] {
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: var(--rues-navy);
}

.rues-dashboard .rues-file-options img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.rues-dashboard #total_reg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    margin: 0 !important;
    color: var(--rues-navy);
    font-size: 42px !important;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.rues-dashboard .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--rues-shadow);
}

.rues-dashboard .modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--rues-line);
    background: linear-gradient(120deg, #f8fbfe 0%, #eef5fb 100%);
}

.rues-dashboard .modal-title {
    color: var(--rues-ink);
    font-size: 18px;
    font-weight: 700;
}

.rues-dashboard .modal-body {
    padding: 22px;
    color: var(--rues-text);
    font-size: 14.5px;
    line-height: 1.6;
}

.rues-dashboard .modal-body a {
    color: var(--rues-blue);
    font-weight: 700;
    text-decoration: underline;
}

.rues-dashboard .gif-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rues-blue);
}

/* Datepicker */

.rues-app .ui-datepicker {
    z-index: 1200;
    padding: 10px;
    border: 1px solid var(--rues-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--rues-shadow-sm);
    font-family: var(--rues-font);
    font-size: 13px;
}

.rues-app .ui-datepicker .ui-datepicker-header {
    border: 0;
    border-radius: 8px;
    background: var(--rues-soft-2);
    color: var(--rues-ink);
    font-weight: 700;
}

.rues-app .ui-datepicker .ui-datepicker-title {
    color: var(--rues-ink);
    font-weight: 700;
}

.rues-app .ui-datepicker th {
    color: var(--rues-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.rues-app .ui-datepicker td a,
.rues-app .ui-datepicker td span {
    border-radius: 6px;
    color: var(--rues-text);
    text-align: center;
}

.rues-app .ui-datepicker td a.ui-state-active,
.rues-app .ui-datepicker td a.ui-state-hover {
    border: 0;
    background: var(--rues-navy);
    color: #fff;
}

/* Utilities */

.rues-mt-0 { margin-top: 0 !important; }
.rues-mt-1 { margin-top: 8px !important; }
.rues-mt-2 { margin-top: 16px !important; }
.rues-mt-3 { margin-top: 24px !important; }
.rues-mb-0 { margin-bottom: 0 !important; }
.rues-mb-1 { margin-bottom: 8px !important; }
.rues-mb-2 { margin-bottom: 16px !important; }
.rues-mb-3 { margin-bottom: 24px !important; }
.rues-text-center { text-align: center !important; }
.rues-text-right { text-align: right !important; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .rues-hero__grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 32px;
    }

    .rues-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rues-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .rues-dashboard .rues-filter-actions {
        align-items: stretch;
    }

    .rues-dashboard .rues-filter-actions__inner {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .rues-nav {
        display: none;
    }

    .rues-header__inner {
        gap: 16px;
    }

    .rues-brand img {
        width: 146px;
    }

    .rues-header__cta {
        margin-left: auto;
    }

    .rues-hero {
        padding: 46px 0 112px;
    }

    .rues-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .rues-hero h1 {
        font-size: 40px;
    }

    .rues-hero__panel {
        padding: 22px;
    }

    .rues-card__head {
        padding: 20px 22px;
    }

    .rues-wizard {
        padding: 22px;
    }

    .rues-legal-intro,
    .rues-legal-body {
        padding-right: 22px;
        padding-left: 22px;
    }

    .rues-legal-actions {
        padding: 0 22px 22px;
    }
}

@media (max-width: 640px) {
    .rues-container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .rues-header__inner {
        padding: 8px 18px;
    }

    .rues-brand img {
        width: 132px;
    }

    .rues-header__cta {
        min-height: 38px;
        padding: 0 16px;
        font-size: 13px;
    }

    .rues-hero {
        padding: 38px 0 104px;
    }

    .rues-hero h1 {
        font-size: 32px;
    }

    .rues-hero p {
        font-size: 15.5px;
    }

    .rues-hero__meta {
        gap: 10px 18px;
        font-size: 12.5px;
    }

    .rues-main {
        margin-top: -72px;
    }

    .rues-card,
    .rues-legal-card {
        border-radius: 16px;
    }

    .rues-card__head {
        padding: 18px;
        gap: 12px;
    }

    .rues-card__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 17px;
    }

    .rues-card__heading h2 {
        font-size: 19px;
    }

    .rues-card__head .rues-back {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .rues-wizard {
        padding: 18px;
    }

    .rues-form-grid,
    .rues-form-grid--2,
    .rues-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rues-consent {
        align-items: stretch;
    }

    .rues-consent .rues-btn,
    .rues-form-actions .rues-btn {
        width: 100%;
    }

    .rues-form-actions {
        justify-content: stretch;
    }

    .rues-delivery__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    .rues-tabs.nav-tabs {
        gap: 6px;
    }

    .rues-tabs.nav-tabs > li > a {
        padding: 10px 8px;
        font-size: 11.5px;
    }

    .rues-tabs.nav-tabs > li > a i {
        display: none;
    }

    .rues-wizard .progressbar li {
        padding: 0 4px;
        font-size: 10.5px;
    }

    .rues-wizard .progressbar li::before {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .rues-wizard .progressbar li::after {
        top: 16px;
    }

    .rues-legal-intro,
    .rues-legal-body {
        padding-right: 18px;
        padding-left: 18px;
    }

    .rues-legal-actions {
        padding: 0 18px 18px;
    }

    .rues-legal-actions .rues-btn {
        width: 100%;
    }

    .rues-footer {
        padding: 22px 0;
    }

    .rues-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .rues-footer__links {
        gap: 8px 16px;
    }

    .rues-footer__version {
        padding-left: 0;
        border-left: 0;
    }

    .rues-dashboard-toolbar {
        padding: 18px;
    }

    .rues-dashboard-toolbar__copy h2 {
        font-size: 19px;
    }

    .rues-dashboard .rues-filter-card .rues-wizard {
        padding: 18px;
    }

    .rues-dashboard .rues-filter-actions__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .rues-dashboard .rues-filter-actions__inner .rues-btn {
        width: 100%;
    }

    .rues-dashboard .rues-download-bar {
        justify-content: stretch;
    }

    .rues-dashboard .rues-download-bar .rues-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rues-app *,
    .rues-app *::before,
    .rues-app *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
