html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Custom styles for this template */
#blazor-error-ui,
.components-reconnect-modal {
    display: none !important;
}

.page, main {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ── Login page ── */
.login-container {
    height: 100vh;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('/images/Pension2.jpeg') no-repeat center center / cover;
    background-color: #3a3a3a; /* fallback while image loads */
    position: fixed; /* 👈 key fix — escapes all parent constraints */
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

.login-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

/* CARD */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
}

/* BRAND ROW */
.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .brand-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.brand-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* FIELDS */
.field {
    margin-bottom: 1rem;
}

    .field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 6px;
    }

.field-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color .15s, background .15s;
}

    .field-inner:focus-within {
        border-color: #1D9E75;
        background: rgba(255, 255, 255, 0.18);
    }

    .field-inner svg {
        color: rgba(255, 255, 255, 0.5);
        flex-shrink: 0;
    }

    .field-inner input,
    .field-inner .blazor-input {
        border: none !important;
        outline: none !important;
        background: transparent !important;
        font-size: 14px;
        color: #fff !important;
        padding: 11px 0;
        width: 100%;
        box-shadow: none !important;
    }

        .field-inner input::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

    /* Blazor InputText inside field-inner */
    .field-inner > input[type="text"],
    .field-inner > input[type="password"] {
        background: transparent !important;
        border: none !important;
        color: white !important;
        outline: none !important;
        box-shadow: none !important;
    }

/* SHOW/HIDE PASSWORD */
.toggle-pw {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: color .15s;
}

    .toggle-pw:hover {
        color: #fff;
    }

/* VALIDATION */
.validation-message {
    color: #ffb3b3;
    font-size: 12px;
    margin-top: 4px;
}

/* BUTTON */
.login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #1D9E75;
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-top: 0.5rem;
    transition: background .15s, transform .1s;
}

    .login-btn:hover:not(:disabled) {
        background: #0F6E56;
        transform: translateY(-1px);
    }

    .login-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* ERROR */
.error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(227, 75, 75, 0.2);
    border: 1px solid rgba(227, 75, 75, 0.4);
    border-radius: 8px;
    font-size: 13px;
    color: #ffb3b3;
}

/* ── Profile selector (login step 1) ── */
.profile-selector {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    max-width: 640px;
    width: 100%;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.brand-icon-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

    .brand-icon-sm img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.profile-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2rem 0;
    letter-spacing: -0.3px;
}

.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: white;
    width: 110px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    transition: transform 0.18s, box-shadow 0.18s;
    flex-shrink: 0;
}

.profile-card:hover .profile-avatar,
.profile-card:focus .profile-avatar {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.profile-card:focus {
    outline: none;
}

.profile-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

.profile-loading {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 1rem;
}

/* ── Selected user display (login step 2) ── */
.selected-user-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar-sm {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.selected-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* ── Back button ── */
.back-btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s;
}

    .back-btn:hover {
        color: rgba(255, 255, 255, 0.9);
    }

/* ── "Otros" admin section ── */
.otros-link {
    margin-top: 2rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
    letter-spacing: 0.3px;
}

    .otros-link:hover {
        color: rgba(255, 255, 255, 0.8);
    }

.otros-divider {
    width: 100%;
    max-width: 400px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 1rem 0;
}

.profile-grid-sm {
    gap: 1rem;
}

.profile-card-sm {
    width: 80px;
}

.profile-avatar-admin {
    width: 68px;
    height: 68px;
    font-size: 1.4rem;
    opacity: 0.85;
}

.profile-card-sm:hover .profile-avatar-admin {
    opacity: 1;
}

/* ── Dashboard layout ── */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.greeting h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #111;
}

.greeting p {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 2rem;
}


.stat-card {
    background: #f5f5f4;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: #888;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: #111;
}

    .stat-value.green {
        color: #0F6E56;
    }

    .stat-value.amber {
        color: #854F0B;
    }

/* ── Section label ── */
.section-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 0 0 .75rem;
}

/* ── Quick action buttons ── */
.quick-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity .15s;
}

    .quick-btn:hover {
        opacity: .88;
        text-decoration: none;
    }

.quick-btn--green  { background: #1D9E75; }
.quick-btn--red    { background: #D93025; }
.quick-btn--purple { background: #C026D3; }

/* ── Home stats selector (admin) ── */
.home-stats-selector {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1.25rem;
    margin-bottom: .6rem;
}
.home-stats-selector label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}
.home-stats-selector select {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: .35rem .6rem;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
}

/* ── Home stats grid (turno) ── */
.home-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.home-stat-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
}

.home-stat-label {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.3;
}

.home-stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #111;
}

@media (max-width: 480px) {
    .home-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Action cards ── */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.action-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none !important;
    color: inherit;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}

    .action-card:hover {
        border-color: #ccc;
        background: #fafafa;
        text-decoration: none;
    }

.action-card--featured {
    border-color: #1D9E75;
    border-width: 1.5px;
}

.action-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.action-icon--green {
    background: #E1F5EE;
}

.action-icon--blue {
    background: #E6F1FB;
}

.action-icon--amber {
    background: #FAEEDA;
}

.action-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
}

.action-desc {
    font-size: 0.8rem;
    color: #888;
}

/* ── Loading state ── */
.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e5e5e5;
    border-top-color: #1D9E75;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    /* Remove Bootstrap px-4 double-padding on mobile */
    article.content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .dashboard {
        padding: 1rem;
    }

    .app-header {
        padding: 8px 12px;
    }

    .app-header-brand strong {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-username {
        display: none;
    }
}

/* ── Activas page ── */
.activas-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.activas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.activas-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 2px;
    color: #111;
}

.activas-sub {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.activas-back {
    font-size: 13px;
    color: #555;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: background .15s;
}

    .activas-back:hover {
        background: #f5f5f4;
        text-decoration: none;
    }

/* Filters */
.activas-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 1.25rem;
    align-items: end;
}

.filter-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.filter-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s;
}

    .filter-field input:focus {
        border-color: #1D9E75;
    }

.filter-actions {
    display: flex;
    gap: 8px;
}

.btn-search {
    padding: 8px 16px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

    .btn-search:hover {
        background: #0F6E56;
    }

.btn-clear {
    padding: 8px 12px;
    background: #f5f5f4;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* Table */
.activas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .activas-table thead th {
        font-size: 11px;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .04em;
        padding: 8px 12px;
        border-bottom: 1px solid #e5e5e5;
        text-align: left;
    }

    .activas-table tbody tr {
        border-bottom: 1px solid #f0f0f0;
        transition: background .1s;
    }

        .activas-table tbody tr:hover {
            background: #fafafa;
        }

    .activas-table td {
        padding: 10px 12px;
        vertical-align: middle;
    }

.folio-tag {
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
    color: #111;
}

a.folio-link {
    color: #1D9E75;
    text-decoration: none;
    transition: color .15s;
}

    a.folio-link:hover {
        color: #0F6E56;
        text-decoration: underline;
    }

.fecha-cell {
    font-size: 12px;
    color: #888;
}

.dias-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-ok {
    background: #E1F5EE;
    color: #085041;
}

.badge-warn {
    background: #FAEEDA;
    color: #633806;
}

.badge-danger {
    background: #FCEBEB;
    color: #791F1F;
}

.monto-cell {
    font-weight: 600;
    color: #0F6E56;
}

.tipo-pill {
    display: inline-block;
    padding: 2px 10px;
    background: #f5f5f4;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 11px;
    color: #666;
}

.actions-cell {
    white-space: nowrap;
}

.btn-salida {
    padding: 5px 12px;
    background: #FAEEDA;
    color: #633806;
    border: 1px solid #EF9F27;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s;
}

    .btn-salida:hover {
        background: #FAC775;
    }

.btn-cobrar {
    padding: 5px 12px;
    background: #E1F5EE;
    color: #085041;
    border: 1px solid #5DCAA5;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
    transition: background .15s;
}

    .btn-cobrar:hover {
        background: #9FE1CB;
    }

/* Pagination */
.activas-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.25rem;
}

.pg-btn {
    padding: 6px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #111;
    transition: background .15s;
}

    .pg-btn:hover:not(:disabled) {
        background: #f5f5f4;
    }

    .pg-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.pg-info {
    font-size: 13px;
    color: #888;
}

/* Checkout panel */
.checkout-panel {
    margin-top: 1.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    max-width: 420px;
}

.checkout-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0 0 1rem;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-label {
    color: #888;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.total-label {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #0F6E56;
}

.checkout-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.btn-confirm {
    flex: 1;
    padding: 10px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-confirm:hover {
        background: #0F6E56;
    }

.btn-cancel {
    padding: 10px 16px;
    background: #f5f5f4;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Floating modal for edit / delete */
.activas-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.activas-modal {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    max-height: 90vh;
    overflow-y: auto;
}

.activas-modal-sm {
    max-width: 360px;
}

.fotos-modal {
    max-width: 540px;
    width: 95%;
}

.fotos-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: .5rem;
}

.fotos-modal-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: opacity .15s;
}

.fotos-modal-img:hover { opacity: .85; }

.btn-fotos {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background .15s;
}

.btn-fotos:hover { background: #f1f5f9; }

/* Edit / Delete icon buttons */
.btn-icon-edit,
.btn-icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
}

.btn-icon-edit {
    background: #EEF2FF;
    color: #3730A3;
    margin-right: 4px;
}

    .btn-icon-edit:hover { background: #C7D2FE; }

.btn-icon-delete {
    background: #FEF2F2;
    color: #B91C1C;
}

    .btn-icon-delete:hover { background: #FECACA; }

/* Edit panel */
.edit-panel {
    max-width: 480px;
}

.edit-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: .75rem;
}

    .edit-form-field label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #888;
    }

    .edit-form-field input,
    .edit-form-field select {
        padding: 8px 10px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        font-size: 13px;
        color: #111;
        background: #fafafa;
    }

    .edit-form-field input:focus,
    .edit-form-field select:focus {
        outline: none;
        border-color: #1D9E75;
        background: #fff;
    }

/* Delete confirmation */
.delete-warning {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.btn-danger {
    flex: 1;
    padding: 10px;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-danger:hover { background: #B91C1C; }
    .btn-danger:disabled { opacity: .6; cursor: not-allowed; }

/* Empty / loading */
.activas-empty {
    padding: 3rem;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.activas-loading {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

@media (max-width: 768px) {
    .activas-filters {
        grid-template-columns: 1fr;
    }

    .activas-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .person-table,
    .detail-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .checkout-panel {
        max-width: 100%;
    }
}

/* ── Activas: fila Inmediata ── */
.activas-row-inmediata {
    background: #f8f7ff;
}

.activas-inmediata-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 9px;
    font-weight: 700;
    background: #EEF2FF;
    color: #3730A3;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: .04em;
    vertical-align: middle;
}

.activas-pagado-chip {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 700;
    background: #E1F5EE;
    color: #085041;
    border-radius: 20px;
    padding: 2px 8px;
    vertical-align: middle;
}

.result-badge-inmediata {
    padding: 3px 10px;
    background: #EEF2FF;
    color: #3730A3;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.result-badge-pagado {
    padding: 3px 10px;
    background: #E1F5EE;
    color: #085041;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* ── Buscar page ── */
.buscar-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.buscar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.buscar-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 2px;
    color: #111;
}

.buscar-sub {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.buscar-box {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    align-items: center;
}

.buscar-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    outline: none;
    transition: border-color .15s;
}

    .buscar-input:focus {
        border-color: #1D9E75;
    }

.s-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

    .s-btn:hover {
        background: #0F6E56;
    }

.c-btn {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f4;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

    .c-btn:hover {
        background: #ececea;
    }

/* Result card */
.result-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.result-folio {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.result-badge {
    padding: 3px 10px;
    background: #E1F5EE;
    color: #085041;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.result-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: .75rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.result-label {
    color: #888;
}

.result-divider {
    height: 1px;
    background: #f0f0f0;
    margin: .75rem 0;
}

.result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.total-lbl {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.total-val {
    font-size: 24px;
    font-weight: 700;
    color: #0F6E56;
}

/* Billing options */
.billing-options {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1rem;
}

.billing-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.billing-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1D9E75;
}

.billing-metodo {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.billing-metodo-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.billing-select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #111;
}

/* Charge breakdown */
.result-breakdown {
    background: #f8f8f8;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
}

.cobrar-btn {
    width: 100%;
    padding: 11px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .cobrar-btn:hover {
        background: #0F6E56;
    }

/* Not found */
.not-found {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FCEBEB;
    border: 1px solid #F09595;
    border-radius: 8px;
    font-size: 13px;
    color: #791F1F;
    margin-top: .5rem;
}

/* Already paid notice */
.paid-notice {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.paid-notice-header {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.paid-notice-icon {
    color: #1D9E75;
    flex-shrink: 0;
    margin-top: 1px;
}

.paid-notice-title {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.paid-notice-sub {
    font-size: 12px;
    color: #888;
    margin: 2px 0 0;
}

.paid-notice-rows {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    border-top: 1px solid #f0f0f0;
    padding-top: .65rem;
}

.paid-notice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.paid-notice-row span:first-child {
    color: #888;
}

/* Success card */
.cobro-exito {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.25rem;
    background: #EDFAF4;
    border: 1px solid #A7E7C8;
    border-radius: 12px;
    margin-top: .75rem;
}

.cobro-exito-icon {
    color: #1D9E75;
    flex-shrink: 0;
}

.cobro-exito-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F5F40;
    margin: 0 0 2px;
}

.cobro-exito-detail {
    font-size: 13px;
    color: #1D9E75;
    margin: 0;
}

/* ── Tipo selector (paso 1 de entrada) ── */
.tipo-sel-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tipo-sel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.tipo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tipo-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    min-height: 72px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

    .tipo-card svg {
        color: #7c3aed;
        flex-shrink: 0;
    }

    .tipo-card:hover {
        border-color: #7c3aed;
        box-shadow: 0 4px 12px rgba(124,58,237,.15);
        transform: translateY(-1px);
    }

    .tipo-card:active {
        transform: translateY(0);
    }

    .tipo-card span {
        line-height: 1.3;
    }

.tipo-card--otros {
    color: #6b7280;
}

.tipo-volver {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    display: block;
    transition: color 0.15s;
}

    .tipo-volver:hover {
        color: #374151;
    }

.tipo-badge {
    display: inline-block;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
}

/* ── Pasos fotográficos de entrada ── */
.paso-wrap {
    max-width: 460px;
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paso-tipo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.paso-cambiar {
    background: transparent;
    border: none;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.15s;
}

    .paso-cambiar:hover { color: #374151; }

.paso-header { margin-bottom: 0.25rem; }

.paso-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.25;
}

.paso-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 5px 0 0;
}

/* Área de cámara */
.camara-area {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.camara-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camara-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #d1d5db;
}

.camara-error-txt {
    font-size: 13px;
    color: #ef4444;
    text-align: center;
    max-width: 260px;
    margin: 0;
}

.camara-retry {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

    .camara-retry:hover { background: #fef2f2; }

/* Botones de paso */
.paso-btn {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: filter 0.15s, transform 0.1s;
}

    .paso-btn:active:not(:disabled) { transform: scale(0.98); }

    .paso-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.paso-btn--capturar {
    background: #f97316;
    color: #fff;
}

    .paso-btn--capturar:hover:not(:disabled) { filter: brightness(1.08); }

.paso-btn--continuar {
    background: #16a34a;
    color: #fff;
}

    .paso-btn--continuar:hover:not(:disabled) { filter: brightness(1.08); }

.paso-btn--cancelar {
    background: #dc2626;
    color: #fff;
}

    .paso-btn--cancelar:hover:not(:disabled) { filter: brightness(1.08); }

/* Miniaturas de fotos capturadas */
.paso-thumbs {
    display: flex;
    gap: 0.75rem;
}

.paso-thumb-wrap {
    position: relative;
    flex: 1;
    max-width: 160px;
    aspect-ratio: 4 / 3;
}

.paso-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    display: block;
}

.paso-thumb-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #dc2626;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Teléfono (paso 4) */
.paso-tel-wrap { display: flex; flex-direction: column; gap: 8px; }

.paso-tel-label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.paso-tel-input {
    width: 100%;
    padding: 18px 16px;
    font-size: 22px;
    font-weight: 500;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s;
    letter-spacing: 2px;
    box-sizing: border-box;
}

    .paso-tel-input:focus { border-color: #7c3aed; }

/* Error inline de paso */
.paso-error {
    color: #dc2626;
    font-size: 14px;
    margin: 0;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* ── Confirmación post-registro (paso 5) ── */
.confirmacion-icono {
    text-align: center;
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.confirmacion-info {
    text-align: center;
    margin-bottom: 0.5rem;
}

.confirmacion-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.confirmacion-folio {
    font-size: 1rem;
    color: #374151;
    margin: 0 0 4px;
}

.confirmacion-tipo {
    display: inline-block;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: 99px;
    margin: 0;
}

.paso-btn--imprimir {
    background: #1d4ed8;
    color: #fff;
}

    .paso-btn--imprimir:hover:not(:disabled) { filter: brightness(1.1); }

.paso-btn--whatsapp {
    background: #25d366;
    color: #fff;
}

    .paso-btn--whatsapp:hover:not(:disabled) { filter: brightness(1.08); }

.penoles-cobro-wrap {
    width: 100%;
    max-width: 340px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .9rem 1.1rem;
    margin-bottom: .75rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.penoles-cobro-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.penoles-cobro-label { font-size: 13px; color: #64748b; font-weight: 500; }
.penoles-cobro-total { font-size: 1.25rem; color: #0F6E56; font-weight: 700; }
.penoles-cobro-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: .3rem .6rem;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
}

.confirmacion-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 0.5rem;
}

.confirmacion-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

    .confirmacion-link:hover { color: #374151; }

/* ── Crear page ── */
.crear-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.crear-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.crear-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 2px;
    color: #111;
}

.crear-sub {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.success-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #E1F5EE;
    border: 1px solid #5DCAA5;
    border-radius: 8px;
    font-size: 13px;
    color: #085041;
    margin-bottom: 1.25rem;
}

.crear-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
}

.crear-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 1.25rem 0 .75rem;
}

    .crear-section-label:first-child {
        margin-top: 0;
    }

.crear-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.crear-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Shared form-field (also used by Buscar/Activas) */
.form-field {
    margin-bottom: .875rem;
}

    .form-field label {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .04em;
        margin-bottom: 5px;
    }

    .form-field input,
    .form-field select,
    .form-field .blazor-input {
        width: 100%;
        padding: 9px 10px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        font-size: 13px;
        color: #111;
        background: #fff;
        box-sizing: border-box;
        outline: none;
        transition: border-color .15s;
    }

        .form-field input:focus,
        .form-field select:focus {
            border-color: #1D9E75;
        }

.optional {
    font-size: 10px;
    color: #bbb;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.crear-validation {
    font-size: 12px;
    color: #A32D2D;
    margin-bottom: 1rem;
}

.foto-counter {
    float: right;
    font-size: .8rem;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    border-radius: 999px;
    padding: 1px 10px;
}

/* ── Image capture ── */
.img-capture-section {
    margin-bottom: .5rem;
}

.img-capture-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.img-upload-btn,
.img-camera-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    background: #f5f5f4;
    color: #333;
    border: 1px solid #e5e5e5;
    user-select: none;
}

    .img-upload-btn:hover,
    .img-camera-btn:hover:not(:disabled) {
        background: #eaeaea;
        border-color: #d0d0d0;
    }

    .img-camera-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.camera-panel {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: .75rem;
}

.camera-video {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.camera-controls {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(0,0,0,.6);
}

.camera-error-msg {
    padding: 8px 10px;
    font-size: 12px;
    color: #ffb3b3;
    margin: 0;
}

.img-preview-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.img-thumb-wrap {
    position: relative;
}

.img-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    display: block;
}

.img-file-wrap {
    display: flex;
    align-items: center;
}

.img-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 11px;
    color: #555;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img-thumb-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #e53e3e;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

    .img-thumb-remove:hover {
        background: #c53030;
    }

.crear-actions {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.submit-btn {
    flex: 1;
    padding: 11px;
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .submit-btn:hover:not(:disabled) {
        background: #0F6E56;
    }

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.back-lnk {
    padding: 11px 16px;
    background: #f5f5f4;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}

    .back-lnk:hover {
        background: #ececea;
        text-decoration: none;
    }

/* Blazor InputText/InputSelect inside form-field */
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select {
    width: 100% !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

    .form-field input:focus,
    .form-field select:focus {
        border-color: #1D9E75 !important;
        box-shadow: none !important;
    }

@media (max-width: 600px) {
    .crear-grid-2,
    .crear-grid-3,
    .tipo-grid {
        grid-template-columns: 1fr;
    }

    .camera-video {
        max-height: 60vh;
    }

    .buscar-box {
        flex-wrap: wrap;
    }
}

/* ── QR Scanner ── */
.qr-scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: #f0faf6;
    color: #1D9E75;
    border: 1px solid #b6e8d5;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

    .qr-scan-btn:hover {
        background: #d9f5ec;
    }

.qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    width: min(92vw, 380px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}

.qr-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}

.qr-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qr-crosshair {
    position: absolute;
    inset: 20%;
    border: 2.5px solid #1D9E75;
    border-radius: 8px;
    pointer-events: none;
}

    .qr-crosshair::before, .qr-crosshair::after {
        content: '';
        position: absolute;
        background: #1D9E75;
    }

    .qr-crosshair::before {
        left: 50%;
        top: -1px;
        bottom: -1px;
        width: 1.5px;
        transform: translateX(-50%);
        opacity: .3;
    }

    .qr-crosshair::after {
        top: 50%;
        left: -1px;
        right: -1px;
        height: 1.5px;
        transform: translateY(-50%);
        opacity: .3;
    }

.qr-error {
    font-size: 12px;
    color: #c0392b;
    margin: 0;
    text-align: center;
}

.qr-cancel-btn {
    width: 100%;
    justify-content: center;
}

/* ── Recibo page ── */
.recibo-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 620px;
    margin: 1.5rem auto 1rem;
    padding: 0 1rem;
}

.recibo {
    max-width: 620px;
    margin: 0 auto 2rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 2rem;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.recibo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 80%;
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.recibo-contacto {
    font-size: 11px;
    color: #888;
    line-height: 1.7;
    margin-top: .25rem;
}

    .recibo-contacto p {
        margin: 0;
    }

.recibo-pagado-pill {
    display: inline-block;
    padding: 2px 10px;
    background: #E1F5EE;
    color: #085041;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.recibo-salida-actions {
    max-width: 620px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 1rem;
}

/* Header */
.recibo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.recibo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recibo-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

    .recibo-brand-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.recibo-brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.recibo-brand-sub {
    font-size: 11px;
    color: #888;
    margin: 0;
}

.recibo-folio-box {
    text-align: right;
}

.recibo-folio-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: 2px;
}

.recibo-folio {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

/* Divider */
.recibo-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1rem 0;
}

/* Section labels */
.recibo-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin: 1rem 0 .6rem;
}

/* Grid of fields */
.recibo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recibo-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recibo-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #bbb;
}

.recibo-value {
    font-size: 13px;
    color: #111;
    font-weight: 500;
}

    .recibo-value.placa {
        font-family: monospace;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .05em;
    }

/* Footer with QR */
.recibo-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: .5rem;
}

.recibo-qr-area {
    text-align: center;
    flex-shrink: 0;
}

.recibo-fotos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: .5rem;
}

.recibo-foto-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: opacity .15s;
}

    .recibo-foto-link:hover {
        opacity: 0.85;
    }

.recibo-foto {
    width: 220px;
    height: 220px;
    object-fit: cover;
    display: block;
}

.recibo-qr-label {
    font-size: 10px;
    color: #aaa;
    margin: 4px 0 0;
}

.recibo-note {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

    .recibo-note p {
        margin: 0 0 4px;
    }

.recibo-fecha-impresion {
    margin-top: 8px !important;
    font-size: 10px;
    color: #bbb;
}

@media (max-width: 480px) {
    .recibo-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .recibo {
        padding: 1.25rem;
    }
}

/* ── Print styles ── */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .recibo {
        border: none;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
    }

    .recibo-watermark {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Hide Blazor navbar when printing */
    .page > main > div:first-child {
        display: none !important;
    }

    /* Fotos: 3 por fila, altura reducida para caber en una página */
    .recibo-fotos {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        page-break-inside: avoid;
    }

    /* Anula flex heredado en contextos que lo hubieran establecido */
    .recibo-foto-link,
    .recibo-fotos > .recibo-foto {
        width: 100%;
    }

    .recibo-foto {
        width: 100%;
        height: 88px;
        object-fit: cover;
    }

    /* Evitar que el footer se corte entre páginas */
    .recibo-footer {
        page-break-inside: avoid;
    }

    .recibo-contacto {
        page-break-inside: avoid;
    }
}

.buscar-result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reprint-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f5f5f4;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background .15s;
    box-sizing: border-box;
}

    .reprint-btn:hover {
        background: #ececea;
        text-decoration: none;
        color: #333;
    }

/* ── TotalVehiculos page ── */
.tv-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.tv-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 2px;
    color: #111;
}

.tv-sub {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Metrics grid */
.tv-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.tv-metric {
    background: #f5f5f4;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tv-metric-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tv-metric-val {
    font-size: 1.6rem;
    font-weight: 600;
    color: #111;
}

    .tv-metric-val.green {
        color: #0F6E56;
    }

    .tv-metric-val.amber {
        color: #854F0B;
    }

    .tv-metric-val.blue {
        color: #1a6fb5;
    }

.tv-metric-btn {
    border: none;
    cursor: pointer;
    text-align: left;
    transition: box-shadow 0.15s, transform 0.1s;
}

.tv-metric-btn:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.tv-metric-hint {
    font-size: 11px;
    color: #1D9E75;
    font-weight: 600;
    margin-top: 2px;
}

/* Modal */
.tv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 2rem;
    overflow-y: auto;
}

.tv-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 960px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    margin: auto;
}

.tv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .875rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.tv-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.tv-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.tv-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.tv-modal-body {
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.metodo-pill {
    font-size: 11px;
    font-weight: 600;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* Filters */
.tv-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 1.5rem;
    align-items: end;
}

.ff label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}

.ff input,
.ff select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s;
}

    .ff input:focus,
    .ff select:focus {
        border-color: #1D9E75;
    }

.tv-filter-btns {
    display: flex;
    gap: 8px;
}

/* Section headers */
.tv-section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.tv-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.tv-section-count {
    font-size: 12px;
    color: #888;
}

.tv-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1.5rem 0;
}

/* Pending amount cell */
.monto-pending {
    font-weight: 600;
    color: #854F0B;
}

/* Responsive */
@media (max-width: 768px) {
    .tv-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .tv-filters {
        grid-template-columns: 1fr;
    }
}

/* ── Por Persona page ── */
.pp-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 1.25rem;
    align-items: end;
}

/* Person table */
.person-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .person-table thead th {
        font-size: 11px;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .04em;
        padding: 8px 12px;
        border-bottom: 1px solid #e5e5e5;
        text-align: left;
    }

.person-row {
    cursor: pointer;
    transition: background .1s;
}

    .person-row:hover {
        background: #fafafa;
    }

    .person-row td {
        padding: 11px 12px;
        border-bottom: 1px solid #f0f0f0;
        vertical-align: middle;
    }

.expand-icon {
    font-size: 11px;
    color: #aaa;
    display: inline-block;
    transition: transform .2s;
}

    .expand-icon.open {
        transform: rotate(90deg);
    }

.person-name {
    font-weight: 500;
    color: #111;
}

.badge-activo {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    background: #E1F5EE;
    color: #085041;
    font-weight: 600;
    margin-left: 4px;
}

/* Detail expanded row */
.detail-row td {
    padding: 0;
}

.detail-inner {
    background: #f9f9f8;
    padding: .75rem 1rem .75rem 2.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .detail-table th {
        font-size: 10px;
        font-weight: 600;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: .04em;
        padding: 5px 10px;
        border-bottom: 1px solid #e5e5e5;
        text-align: left;
    }

    .detail-table td {
        padding: 7px 10px;
        border-bottom: 1px solid #f5f5f4;
        color: #333;
    }

/* ── Usuarios page ── */
.usuarios-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset-pw {
    padding: 5px 12px;
    background: #E6F1FB;
    color: #1a4f7a;
    border: 1px solid #93C5E8;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
    transition: background .15s;
}

    .btn-reset-pw:hover {
        background: #C7DFF6;
    }

/* password and number inputs inside form-field */
.form-field input[type="password"],
.form-field input[type="number"] {
    width: 100% !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

    .form-field input[type="password"]:focus,
    .form-field input[type="number"]:focus {
        border-color: #1D9E75 !important;
        box-shadow: none !important;
    }

.status-fuera {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    background: #f0f0f0;
    color: #555;
    font-weight: 500;
}

/* ── App header ── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #f5f5f4;
    border-bottom: 1px solid #e5e5e5;
}

.app-header-brand {
    font-size: 14px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.header-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-username {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #444;
}

.header-logout {
    padding: 5px 12px;
    background: #fff;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .header-logout:hover {
        background: #FCEBEB;
        border-color: #F09595;
        color: #791F1F;
    }

@media (max-width: 768px) {
    .pp-filters {
        grid-template-columns: 1fr;
    }
}

/* ── Download page ── */

.export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    color: #111;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

    .export-btn:hover {
        background: #f5f5f4;
    }

.pp-filters-full {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 1.25rem;
    align-items: end;
}

@media (max-width: 768px) {
    .pp-filters-full {
        grid-template-columns: 1fr;
    }
}

/* ── Corte de Caja ── */
.corte-controls {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background: #f9f9f8;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.corte-range {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.corte-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    margin-left: auto;
}

.corte-quick-btns {
    display: flex;
    gap: 6px;
}

.btn-quick {
    padding: 6px 14px;
    background: #fff;
    color: #555;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .btn-quick:hover {
        background: #E1F5EE;
        border-color: #1D9E75;
        color: #085041;
    }

.corte-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
}

.corte-total-row td {
    padding: 10px 12px;
    border-top: 2px solid #e5e5e5;
    background: #f9f9f8;
}

@media (max-width: 768px) {
    .corte-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .corte-range {
        flex-direction: column;
    }

    .corte-actions {
        margin-left: 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .corte-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

