/* Checador UI — lenguaje visual RRT-Programa-Produccion, elevado */

:root {
    --rrt-background: #f0f0f0;
    --rrt-header: #4a90e2;
    --rrt-header-text: #ffffff;
    --rrt-button: #4caf50;
    --rrt-button-text: #ffffff;
    --rrt-button-hover: #45a049;
    --rrt-section-bg: #e3f2fd;
    --rrt-section-text: #333333;
    --rrt-title-bg: #4a90e2;
    --rrt-frame-border: #ddd;
    --rrt-text-muted: #5a6570;
    --rrt-card-bg: #ffffff;
    --font-display: "Outfit", "Segoe UI", sans-serif;
    --font-body: "DM Sans", "Segoe UI", Tahoma, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--rrt-section-text);
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(74, 144, 226, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(76, 175, 80, 0.12), transparent 50%),
        linear-gradient(180deg, #e8eef5 0%, var(--rrt-background) 40%, #ebebeb 100%);
    min-height: 100vh;
}

body.kiosk-page {
    background: linear-gradient(160deg, #dfe9f5 0%, #f0f0f0 45%, #e4edf7 100%);
}

body.kiosk-capture {
    background: #111;
}

h1, h2, h3, h4, h5, .navbar-brand, .title-header, .display-brand {
    font-family: var(--font-display);
}

/* —— Navbar RRT —— */
.navbar-rrt {
    background-color: var(--rrt-header) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.navbar-rrt .navbar-brand {
    font-weight: 700;
    color: var(--rrt-header-text) !important;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.navbar-rrt .nav-link,
.navbar-rrt .navbar-text {
    color: var(--rrt-header-text) !important;
    font-weight: 500;
}

.navbar-rrt .nav-link:hover,
.navbar-rrt .nav-link:focus {
    color: #e8f4f8 !important;
}

.navbar-rrt .nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.35em;
}

.navbar-rrt .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff;
    font-weight: 600;
}

.navbar-rrt .btn-outline-light:hover,
.navbar-rrt .btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: #fff;
}

.navbar-rrt .btn-outline-light.active {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    border-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.navbar-rrt .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
}

.navbar-rrt .navbar-toggler-icon {
    filter: invert(1);
}

.btn-nav-ghost {
    color: var(--rrt-header-text) !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: transparent;
}

.btn-nav-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.btn-nav-solid {
    background: #fff;
    color: var(--rrt-header) !important;
    border: none;
    font-weight: 600;
}

.btn-nav-solid:hover {
    background: #e8f4f8;
    color: #2f6db8 !important;
}

.btn-back-to-menu {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #fff !important;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-back-to-menu:hover,
.btn-back-to-menu:focus {
    background-color: #fff;
    color: var(--rrt-header) !important;
    transform: translateY(-1px);
}

/* —— Buttons —— */
.btn-rrt-primary {
    background-color: var(--rrt-button);
    border-color: var(--rrt-button);
    color: var(--rrt-button-text);
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-rrt-primary:hover,
.btn-rrt-primary:focus {
    background-color: var(--rrt-button-hover);
    border-color: var(--rrt-button-hover);
    color: var(--rrt-button-text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

.btn-rrt-outline {
    background: transparent;
    border: 2px solid var(--rrt-header);
    color: var(--rrt-header);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-rrt-outline:hover,
.btn-rrt-outline:focus {
    background: var(--rrt-header);
    color: #fff;
}

.btn-process {
    background: var(--rrt-button);
    border: none;
    padding: 0.55rem 1.25rem;
    font-weight: 700;
    border-radius: 6px;
    color: var(--rrt-button-text);
    transition: all 0.2s ease;
}

.btn-process:hover {
    background: var(--rrt-button-hover);
    color: var(--rrt-button-text);
    transform: translateY(-1px);
}

/* —— Layout blocks —— */
.title-header {
    background: linear-gradient(135deg, var(--rrt-title-bg) 0%, #3a7bc8 100%);
    color: var(--rrt-header-text);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.35);
}

.title-header h1,
.title-header .h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
}

.title-header .lead,
.title-header p {
    margin: 0.35rem 0 0;
    opacity: 0.92;
    font-size: 0.95rem;
}

.section-frame {
    background-color: var(--rrt-section-bg);
    border: 2px solid var(--rrt-frame-border);
    border-radius: 10px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.35rem;
}

.section-title {
    color: var(--rrt-section-text);
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--rrt-header);
    padding-bottom: 0.5rem;
    font-family: var(--font-display);
}

.panel-card {
    background: var(--rrt-card-bg);
    border: 2px solid var(--rrt-frame-border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.35rem;
    overflow: hidden;
}

.panel-card .panel-card-header {
    background: #f7fafc;
    border-bottom: 1px solid var(--rrt-frame-border);
    padding: 0.85rem 1.15rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.panel-card .panel-card-body {
    padding: 1.15rem;
}

.panel-card .panel-card-body.p-0 {
    padding: 0;
}

.empleado-foto-preview {
    display: flex;
    justify-content: center;
    background: #f7fafc;
    border: 1px solid var(--rrt-frame-border);
    border-radius: 8px;
    padding: 0.75rem;
    overflow: hidden;
}

.empleado-foto-preview img {
    display: block;
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

/* —— Process cards (hub / menú) —— */
.card-process {
    border: 2px solid var(--rrt-frame-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    background: var(--rrt-card-bg);
    border-radius: 10px;
    height: 100%;
}

.card-process:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
    border-color: var(--rrt-header);
}

.card-process .card-body {
    display: flex;
    flex-direction: column;
}

.card-process .card-icon {
    font-size: 2.25rem;
    color: var(--rrt-header);
    margin-bottom: 0.75rem;
}

.card-process .card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
}

/* —— Auth / marketing cards —— */
.auth-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.35s ease;
}

.auth-card .auth-card-header {
    background: linear-gradient(135deg, var(--rrt-header) 0%, #3a7bc8 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem 1.25rem;
}

.auth-card .auth-card-header h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
}

.auth-card .auth-card-body {
    padding: 1.75rem;
    background: #fff;
}

.hero-brand {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    animation: fadeInUp 0.4s ease;
}

.hero-brand .display-brand {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--rrt-header);
    margin-bottom: 0.5rem;
}

.hero-brand .hero-tagline {
    font-size: 1.1rem;
    color: var(--rrt-text-muted);
    max-width: 32rem;
    margin: 0 auto 1.5rem;
}

.plan-card {
    background: #fff;
    border: 2px solid var(--rrt-frame-border);
    border-radius: 14px;
    padding: 1.75rem;
    height: 100%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--rrt-header);
}

.plan-card.plan-featured {
    border-color: var(--rrt-header);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.2);
}

.plan-card .plan-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.plan-card .plan-price {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--rrt-header);
    margin: 0.5rem 0;
}

/* —— Stats chips —— */
.stat-chip {
    display: inline-flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid var(--rrt-frame-border);
    border-radius: 10px;
    padding: 0.85rem 1.15rem;
    min-width: 10rem;
    margin: 0.25rem;
}

.stat-chip .stat-label {
    font-size: 0.8rem;
    color: var(--rrt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-chip .stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--rrt-header);
}

/* —— Badges —— */
.badge-entrada {
    background-color: var(--rrt-button) !important;
}

.badge-salida {
    background-color: #f0ad4e !important;
    color: #212529 !important;
}

/* —— Empty state —— */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--rrt-text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--rrt-header);
    opacity: 0.7;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* —— Forms —— */
.form-control,
.form-select {
    border-radius: 8px;
    border-color: #c5cdd6;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--rrt-header);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-label {
    font-weight: 600;
}

/* —— Tables —— */
.table-rrt thead th {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.table-responsive {
    max-height: 70vh;
    overflow-y: auto;
}

/* —— Kiosk —— */
.kiosk-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: safe center;
    justify-content: center;
    padding:
        max(0.75rem, env(safe-area-inset-top, 0px))
        max(0.75rem, env(safe-area-inset-right, 0px))
        max(0.75rem, env(safe-area-inset-bottom, 0px))
        max(0.75rem, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.kiosk-card {
    max-width: 500px;
    width: 100%;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    animation: fadeInUp 0.35s ease;
    background: #fff;
}

.kiosk-card .kiosk-header {
    background: linear-gradient(135deg, var(--rrt-header) 0%, #3a7bc8 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem 1.25rem;
}

.kiosk-card .kiosk-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.kiosk-card .kiosk-header .org-name {
    margin-top: 0.35rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.kiosk-card .kiosk-body {
    padding: 1.5rem;
}

.kiosk-confirm-type {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.kiosk-confirm-type.is-entrada {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 2px solid var(--rrt-button);
}

.kiosk-confirm-type.is-salida {
    background: rgba(240, 173, 78, 0.2);
    color: #8a5a00;
    border: 2px solid #f0ad4e;
}

/* Compact kiosk card — fits short viewports (all kiosk-page card screens) */
.kiosk-card-compact {
    max-width: 420px;
    border-radius: 12px;
}

.kiosk-card-compact .kiosk-header {
    padding: 0.45rem 0.75rem;
}

.kiosk-card-compact .kiosk-header h1 {
    font-size: 0.98rem;
}

.kiosk-card-compact .kiosk-header .org-name {
    font-size: 0.75rem;
    margin-top: 0.05rem;
}

.kiosk-card-compact .kiosk-body {
    padding: 0.55rem 0.75rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.kiosk-card-compact .kiosk-employee {
    line-height: 1.15;
}

.kiosk-card-compact .kiosk-avatar {
    font-size: 1.65rem;
    color: var(--rrt-header);
    line-height: 1;
    display: block;
    margin-bottom: 0.15rem;
}

.kiosk-card-compact .kiosk-employee-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.2;
}

.kiosk-card-compact .kiosk-clave {
    font-size: 0.8rem;
}

.kiosk-card-compact .kiosk-meta {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kiosk-card-compact .kiosk-return-box {
    padding: 0.35rem 0.55rem;
    margin-top: 0.15rem;
    gap: 0.5rem;
}

.kiosk-card-compact .kiosk-return-label {
    font-size: 0.8rem;
}

.kiosk-card-compact .kiosk-return-time {
    font-size: 1.2rem;
    font-family: var(--font-display);
    line-height: 1;
}

.kiosk-card-compact .kiosk-confirm-type {
    padding: 0.35rem 0.55rem;
    font-size: 0.9rem;
    border-radius: 8px;
    border-width: 1px;
}

.kiosk-card-compact .kiosk-actions {
    gap: 0.35rem !important;
}

.kiosk-card-compact .kiosk-cta {
    min-height: 36px;
    font-size: 0.88rem;
    border-radius: 8px;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
}

/* Status screens (error / success / metodo no disponible) */
.kiosk-card-compact .kiosk-status-icon {
    font-size: 2rem;
    line-height: 1;
    display: block;
}

.kiosk-card-compact .kiosk-status-icon.is-error {
    color: #e53935;
}

.kiosk-card-compact .kiosk-status-icon.is-success {
    color: var(--rrt-button);
}

.kiosk-card-compact .kiosk-status-icon.is-warning {
    color: #f0ad4e;
}

.kiosk-card-compact .kiosk-status-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.25;
}

.kiosk-card-compact .kiosk-status-title.is-error {
    color: #e53935;
}

.kiosk-card-compact .kiosk-status-title.is-success {
    color: var(--rrt-button);
}

.kiosk-card-compact .kiosk-status-msg {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.35;
}

.kiosk-card-compact .kiosk-status-meta {
    font-size: 0.8rem;
    margin: 0;
}

.kiosk-card-compact .kiosk-status-hint {
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.35;
}

.kiosk-gps-help {
    background: rgba(229, 57, 53, 0.06);
    border: 1px solid rgba(229, 57, 53, 0.2);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
}

.kiosk-card-compact .kiosk-gps-help {
    max-width: none;
    text-align: start;
}

.kiosk-card-compact .kiosk-gps-help .fw-semibold {
    font-size: 0.85rem;
    margin-bottom: 0.35rem !important;
}

.kiosk-card-compact .kiosk-gps-help ol {
    font-size: 0.75rem;
}

.kiosk-card-compact .kiosk-actions-stack {
    display: grid;
    gap: 0.35rem;
    width: 100%;
}

/* Main menu keypad under compact card */
.kiosk-card-compact .kiosk-body > form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.kiosk-card-compact .kiosk-clave-field {
    margin: 0;
}

.kiosk-card-compact .kiosk-clave-field .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.kiosk-card-compact #id_numero {
    font-size: 1.15rem;
    padding: 0.35rem 0.5rem;
    min-height: 2.25rem;
}

.kiosk-card-compact .numeric-keypad {
    margin: 0;
}

.kiosk-card-compact .numeric-keypad .row {
    --bs-gutter-x: 0.35rem;
    --bs-gutter-y: 0.35rem;
}

.kiosk-card-compact .keypad-btn,
.kiosk-card-compact #clearBtn,
.kiosk-card-compact #backspaceBtn {
    min-height: 44px;
    font-size: 1.15rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Tall phones (iPhone 17 Pro Max 440×956 and similar): comfortable touch scale */
@media (max-width: 440px) and (min-height: 700px) {
    .kiosk-card-compact {
        max-width: 100%;
    }

    .kiosk-card-compact .kiosk-header {
        padding: 0.7rem 0.9rem;
    }

    .kiosk-card-compact .kiosk-header h1 {
        font-size: 1.1rem;
    }

    .kiosk-card-compact .kiosk-header .org-name {
        font-size: 0.82rem;
        margin-top: 0.15rem;
    }

    .kiosk-card-compact .kiosk-body {
        padding: 0.75rem 0.9rem 0.9rem;
        gap: 0.6rem;
    }

    .kiosk-card-compact .kiosk-body > form {
        gap: 0.6rem;
    }

    .kiosk-card-compact .kiosk-avatar {
        font-size: 2.1rem;
    }

    .kiosk-card-compact .kiosk-employee-name {
        font-size: 1.2rem;
    }

    .kiosk-card-compact .kiosk-clave {
        font-size: 0.88rem;
    }

    .kiosk-card-compact .kiosk-meta {
        font-size: 0.92rem;
        gap: 0.3rem;
    }

    .kiosk-card-compact .kiosk-return-box {
        padding: 0.45rem 0.65rem;
    }

    .kiosk-card-compact .kiosk-return-label {
        font-size: 0.88rem;
    }

    .kiosk-card-compact .kiosk-return-time {
        font-size: 1.35rem;
    }

    .kiosk-card-compact .kiosk-confirm-type {
        padding: 0.5rem 0.7rem;
        font-size: 1rem;
    }

    .kiosk-card-compact .kiosk-cta {
        min-height: 48px;
        font-size: 0.98rem;
        padding: 0.5rem 0.85rem;
    }

    .kiosk-card-compact .kiosk-status-icon {
        font-size: 2.5rem;
    }

    .kiosk-card-compact .kiosk-status-title {
        font-size: 1.2rem;
    }

    .kiosk-card-compact .kiosk-status-msg {
        font-size: 0.98rem;
    }

    .kiosk-card-compact .kiosk-status-meta {
        font-size: 0.85rem;
    }

    .kiosk-card-compact .kiosk-status-hint {
        font-size: 0.85rem;
    }

    .kiosk-card-compact .kiosk-gps-help {
        padding: 0.7rem 0.85rem;
    }

    .kiosk-card-compact .kiosk-gps-help .fw-semibold {
        font-size: 0.92rem;
    }

    .kiosk-card-compact .kiosk-gps-help ol {
        font-size: 0.82rem;
    }

    .kiosk-card-compact .kiosk-clave-field .form-label {
        font-size: 1rem;
    }

    .kiosk-card-compact #id_numero {
        font-size: 1.35rem;
        min-height: 2.6rem;
        padding: 0.45rem 0.6rem;
    }

    .kiosk-card-compact .numeric-keypad .row {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }

    .kiosk-card-compact .keypad-btn,
    .kiosk-card-compact #clearBtn,
    .kiosk-card-compact #backspaceBtn {
        min-height: 52px;
        font-size: 1.3rem;
    }
}

/* Capture fullscreen — safe areas + dynamic viewport */
.kiosk-capture-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
}

.kiosk-capture-header {
    background: linear-gradient(135deg, var(--rrt-header) 0%, #3a7bc8 100%);
    color: #fff;
    padding:
        max(0.75rem, env(safe-area-inset-top, 0px))
        1rem
        0.75rem;
}

.kiosk-capture-actions {
    background: #1a1a1a;
    padding:
        0.75rem
        max(0.75rem, env(safe-area-inset-right, 0px))
        max(0.75rem, env(safe-area-inset-bottom, 0px))
        max(0.75rem, env(safe-area-inset-left, 0px));
}

/* Numeric keypad */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.numeric-keypad {
    margin: 1rem 0;
}

.keypad-btn {
    min-height: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid var(--rrt-header);
    color: var(--rrt-header);
    background: #fff;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.keypad-btn:hover {
    background: var(--rrt-section-bg);
    color: var(--rrt-header);
}

.keypad-btn:active {
    transform: scale(0.95);
    background-color: var(--rrt-header);
    color: #fff;
}

#id_numero {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    caret-color: transparent !important;
    cursor: default !important;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-family: var(--font-display);
}

@supports (-webkit-touch-callout: none) {
    #id_numero {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
    }
}

.btn-lg.kiosk-cta {
    min-height: 56px;
    font-size: 1.1rem;
    border-radius: 10px;
    font-weight: 700;
}

#video {
    border-radius: 0;
}

#loadingIndicator {
    z-index: 1000;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 576px) {
    .keypad-btn {
        min-height: 50px;
        font-size: 1.2rem;
    }

    .title-header h1,
    .title-header .h1 {
        font-size: 1.35rem;
    }

    .section-frame {
        padding: 1rem;
    }
}

/* —— Tablas: ordenadores + filtro embudo —— */
.tabla-rrt-interactive thead th.th-interactive {
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
}

.tabla-rrt-interactive .th-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}

.tabla-rrt-interactive .th-sort-label {
    cursor: pointer;
    font-weight: 600;
}

.tabla-rrt-interactive .th-sort-label:hover {
    color: var(--rrt-header);
}

.tabla-rrt-interactive .th-sort-icon {
    opacity: 0.4;
    font-size: 0.75rem;
}

.tabla-rrt-interactive th.sort-asc .th-sort-icon,
.tabla-rrt-interactive th.sort-desc .th-sort-icon {
    opacity: 1;
    color: var(--rrt-header);
}

.tabla-rrt-interactive .btn-embudo {
    border: 1px solid #c5cdd6;
    background: #fff;
    color: #6c757d;
    padding: 0.1rem 0.35rem;
    line-height: 1;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tabla-rrt-interactive .btn-embudo:hover {
    border-color: var(--rrt-header);
    color: var(--rrt-header);
}

.tabla-rrt-interactive .btn-embudo.embudo-activo {
    border-color: #ffc107;
    color: #ffc107;
    background: #fffbeb;
}

.popup-col-filtro-list {
    max-height: 320px;
    overflow-y: auto;
}

.popup-col-filtro-list tbody tr.popup-col-filtro-row {
    cursor: pointer;
}

.popup-col-filtro-list tbody tr.popup-col-filtro-row:hover {
    background-color: rgba(74, 144, 226, 0.08);
}

#modalFiltroEmbudo .modal-dialog {
    max-width: 520px;
}
