/* Centropark / qPark — Bootstrap 5.3 + tema oscuro */

@font-face {
    font-family: 'Chirp';
    src: url('font/Chirp-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Chirp';
    src: url('font/Chirp-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Chirp';
    src: url('font/Chirp-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Chirp';
    src: url('font/Chirp-Heavy.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --bg-primary: #131517;
    --bg-secondary: #1a1d20;
    --sidebar-bg: #1d2125;
    --sidebar-border: #2a2f35;
    --sidebar-link-color: #9fadbc;
    --sidebar-link-hover-bg: #303036;
    --sidebar-link-active-bg: #2a2a2a;
    --sidebar-link-active-color: #ffffff;
    --sidebar-logout-hover: #6f272c;
    --sidebar-mantenedores-hover: #1e2451;
    --card-bg: #1a1d20;
    --navbar-bg: #1d2125;
    --navbar-border: #2a2f35;
    --offcanvas-bg: #131313;
    --text-primary: #e8eef6;
    --text-muted: #8e8e8e;
    --btn-secondary-bg: #484d51;
    --btn-secondary-hover: #333639;
    --success-soft: #121e14;
    --success-hover: #1f4524;
    --row-hover: #282e33;
    --btn-border-radius: 1.25rem;
    --sidebar-width: 280px;
}

html {
    font-family: 'Chirp', sans-serif;
    font-size: 13px !important;
}

body {
    font-family: 'Chirp', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.app-wrapper {
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.main-shell {
    height: 100vh;
    min-width: 0;
    background: var(--bg-primary);
}

#sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-color: var(--sidebar-border) !important;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    min-height: 100%;
}

.sidebar-logo-img {
    height: 40px;
    width: auto;
}

.sidebar-user {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--sidebar-link-color);
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-link-hover-bg);
    color: #ededed;
}

.sidebar-link.active {
    background: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-color);
}

.sidebar-link.sidebar-logout:hover {
    background: var(--sidebar-logout-hover);
    color: #fff;
}

.sidebar-link.nav-mantenedores:hover,
.sidebar-link.nav-mantenedores.active {
    background: var(--sidebar-mantenedores-hover);
}

.app-topnav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--navbar-bg);
    border-color: var(--navbar-border) !important;
    min-height: 56px;
}

#mainContent {
    padding-bottom: 100px !important;
}

.offcanvas {
    background: var(--offcanvas-bg);
    width: 85vw;
    max-width: 320px;
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    background: transparent;
    transition: background 0.2s;
}

.mobile-nav-link:hover {
    background: var(--sidebar-link-hover-bg);
    color: #fff;
}

.card {
    border-radius: 14px;
    background-color: var(--card-bg);
    border-color: var(--sidebar-border);
}

.cardd {
    border-radius: 7px;
    transition: background-color 0.2s;
}
.cardd:hover {
    background-color: var(--sidebar-link-hover-bg);
}

.cardinforme {
    border-radius: 7px;
    transition: background-color 0.2s;
    background-color: #1D2125;
}
.cardinforme:hover {
    background-color: #303036;
}

.carddlogout {
    border-radius: 7px;
    transition: background-color 0.2s;
}
.carddlogout:hover {
    background-color: var(--sidebar-logout-hover);
}

.carddmantenedores {
    border-radius: 7px;
    transition: background-color 0.2s;
}
.carddmantenedores:hover {
    background-color: var(--sidebar-mantenedores-hover);
}

.caja-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.caja-card:hover {
    transform: translateY(-2px);
}

.modal-content {
    border-radius: 15px;
    background-color: var(--card-bg);
}

.modal-dialog-logout {
    max-width: 350px;
    width: 100%;
}

.blankslate {
    background: var(--card-bg) !important;
    margin: 0;
    padding: 15px;
}

.badge {
    padding-left: 5px !important;
    padding-right: 5px !important;
    border-radius: 6px !important;
}

.text-bg-discovery {
    background-color: rgba(114, 32, 228, 0.8) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}
.text-bg-success {
    background-color: rgba(9, 101, 30, 0.8) !important;
    color: rgba(203, 255, 216, 0.8) !important;
    border: 0.2px solid rgba(172, 213, 180, 0.8) !important;
}
.text-bg-danger {
    background-color: rgba(101, 0, 10, 0.8) !important;
    color: rgba(255, 238, 240, 0.8) !important;
    border: 0.5px solid rgba(232, 212, 214, 0.8) !important;
}
.text-bg-warning {
    background-color: rgba(131, 98, 0, 0.8) !important;
    color: rgba(255, 226, 140, 0.8) !important;
    border: 1px solid rgba(232, 204, 100, 0.8) !important;
}
.text-bg-primary {
    background-color: rgba(0, 123, 255, 0.8) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(204, 204, 204, 0.85) !important;
}
.text-bg-secondary {
    background-color: rgba(39, 42, 46, 0.8) !important;
    color: rgba(232, 239, 246, 0.8) !important;
    border: 1px solid rgba(200, 210, 220, 0.8) !important;
}
.text-bg-info {
    background-color: rgba(41, 82, 125, 0.8) !important;
    color: rgba(250, 252, 255, 0.8) !important;
}

.bg-danger-soft {
    background-color: rgba(101, 0, 10, 0.35) !important;
}
.bg-success-soft {
    background-color: rgba(9, 101, 30, 0.35) !important;
}

.btn-subtle {
    background: transparent;
    border: 1px solid var(--sidebar-border);
    color: var(--text-primary);
}
.btn-subtle:hover {
    background: var(--sidebar-link-hover-bg);
    color: #fff;
}

.btn-outline-primary,
.btn-outline-secondary {
    border-radius: 8px !important;
}

.btn-secondary {
    background-color: var(--btn-secondary-bg) !important;
    color: #f2f2f2;
    border-color: transparent;
}
.btn-secondary:hover {
    background-color: var(--btn-secondary-hover) !important;
    color: #c7c7c7;
}

.rounded-pill {
    border-radius: var(--btn-border-radius) !important;
}

.text-success {
    color: #3afe5e !important;
}

.hoverable:hover td {
    background-color: var(--row-hover) !important;
    transition: 0.2s;
}
.hoverable-success td {
    background-color: var(--success-soft);
}
.hoverable-success:hover td {
    background-color: var(--success-hover);
}

.toast {
    border-radius: 11px !important;
}
.alert {
    border-radius: 14px !important;
}
.toast-container-fixed {
    z-index: 9999;
    width: 360px;
}

@keyframes bounceInUp {
    0% { transform: translateY(100%); opacity: 0; }
    50% { transform: translateY(-20px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}
@keyframes bounceOutDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}
.toast.show { animation: bounceInUp 0.3s ease-out !important; }
.toast.hide { animation: bounceOutDown 0.3s ease-in !important; }

.progress-bar.bg-success {
    background-color: #a4ddb3 !important;
    border-radius: 14px !important;
}
.progress-bar.bg-danger {
    background-color: #ddbfc3 !important;
    border-radius: 14px !important;
}

/* Loading overlay */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9998;
}
#loading-card {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

[data-tooltipp] {
    position: relative;
    cursor: pointer;
}
[data-tooltipp]::before {
    content: attr(data-tooltipp);
    visibility: hidden;
    background-color: #333639;
    color: #ffffff;
    text-align: center;
    border-radius: 7px;
    padding: 4px;
    position: absolute;
    z-index: 9999;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    white-space: nowrap;
    width: max-content;
    max-width: 140px;
    transition: opacity 0.3s;
}
[data-tooltipp]:hover::before {
    visibility: visible;
    opacity: 1;
}

/* Login */
.login-page {
    min-height: 100vh;
    background: var(--bg-primary);
}
.login-page-inner {
    max-width: 960px;
}
.login-form-col .card {
    max-width: 420px;
}
.login-brand-col {
    background: radial-gradient(#3e3e3e 1px, transparent 1px);
    background-size: 10px 10px;
    background-color: #000;
    border-radius: 14px;
    min-height: 420px;
}

footer {
    text-align: center;
    color: var(--text-muted);
    padding: 1em;
}

.breadcrumb a {
    color: var(--sidebar-link-color);
    text-decoration: none;
}
.breadcrumb-item.active {
    color: var(--text-primary);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
}

@media (max-width: 767.98px) {
    #sidebar {
        display: none !important;
    }
    .main-shell {
        height: auto;
        min-height: 100vh;
    }
}

/* Modal pago — cards de método */
.pago-info-block,
.pago-tarifa-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.pago-total {
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--sidebar-border);
}

.pago-metodo-card {
    position: relative;
    width: 100%;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border-radius: 12px;
    border: 1.5px solid var(--sidebar-border);
    background: #15181b;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.pago-metodo-card:hover {
    border-color: #3d8f4f;
    background: #171c18;
    transform: translateY(-1px);
}

.pago-metodo-card.is-selected {
    border-color: #3afe5e;
    background: var(--success-soft);
    box-shadow: 0 0 0 1px rgba(58, 254, 94, 0.25);
}

.pago-metodo-icon {
    font-size: 1.35rem;
    opacity: 0.9;
}

.pago-metodo-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.pago-metodo-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: transparent;
    font-size: 0.85rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.pago-metodo-card.is-selected .pago-metodo-check {
    background: #3afe5e;
    color: #0b1a0e;
}

.pago-tarjeta-fields {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

/* POS — panel de ingreso grande y claro */
.pos-ingreso-panel {
    background: var(--card-bg);
    border: 1px solid var(--sidebar-border);
    border-radius: 16px;
    padding: 1.25rem 1.35rem 1.4rem;
}

.pos-ingreso-help {
    background: rgba(41, 82, 125, 0.25);
    border: 1px solid rgba(41, 82, 125, 0.45);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.pos-field-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.pos-field-optional {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.pos-input-lg {
    height: 64px !important;
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 12px !important;
    border: 1.5px solid var(--sidebar-border) !important;
    background: #121417 !important;
    color: #fff !important;
    text-align: center;
}

.pos-input-lg:focus {
    border-color: #3afe5e !important;
    box-shadow: 0 0 0 0.2rem rgba(58, 254, 94, 0.18) !important;
}

#floatingInputRUT.pos-input-lg,
#rut_cliente.pos-input-lg {
    letter-spacing: 0.02em;
    text-transform: none;
}

.pos-field-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.pos-or-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2a2f35;
    color: #cfd8e3;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid var(--sidebar-border);
}

.pos-submit-btn {
    min-height: 56px;
    min-width: 220px;
    font-weight: 700;
    font-size: 1.1rem;
}

.pos-ingreso-feedback {
    min-height: 1.25rem;
    font-weight: 600;
}

.pos-ingreso-feedback.is-error {
    color: #ffb3ba;
}

.pos-ingreso-feedback.is-ok {
    color: #a4ddb3;
}

.pos-missing-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .pos-or-badge {
        margin: 0.25rem 0;
    }
    .pos-input-lg {
        height: 58px !important;
        font-size: 1.45rem !important;
    }
}

/* Skeletons tabla POS */
@keyframes posSkeletonShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.pos-skeleton-row td {
    vertical-align: middle;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.pos-skeleton-bar {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        #1a1d20 0%,
        #2a3036 45%,
        #1a1d20 90%
    );
    background-size: 200% 100%;
    animation: posSkeletonShimmer 1.15s ease-in-out infinite;
}

.pos-skeleton-bar.sk-w-sm { width: 42%; min-width: 36px; }
.pos-skeleton-bar.sk-w-md { width: 68%; min-width: 56px; }
.pos-skeleton-bar.sk-w-lg { width: 86%; min-width: 72px; }

.pago-metodos-wrap.is-loading {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.pago-metodos-wrap.is-loading .pago-metodo-card {
    cursor: wait;
}

.pago-info-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.pago-info-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.pago-info-value-lg {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    word-break: break-word;
}

#patenteVehiculo.pago-info-value-lg,
.pos-patente-display {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pos-patente-display,
.pos-rut-display {
    font-size: 1.05rem;
    font-weight: 700;
}

.pago-info-sub {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Hugeicons — placeholder mientras carga la fuente */
html.hgi-font-pending .hgi-stroke {
    border-radius: min(8px, 0.35em);
    overflow: hidden;
    background-color: color-mix(in srgb, var(--bg-tertiary, #2a2a2a) 68%, transparent);
}

html.hgi-font-pending .hgi-stroke::before {
    border-radius: inherit;
}

html.hgi-font-pending .btn .hgi-stroke,
html.hgi-font-pending #sidebar .nav-link:hover .hgi-stroke,
html.hgi-font-pending #sidebar .nav-link.active .hgi-stroke,
html.hgi-font-pending .nav-link.active .hgi-stroke {
    background-color: transparent !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

html.hgi-font-pending .btn .hgi-stroke::before,
html.hgi-font-pending #sidebar .nav-link:hover .hgi-stroke::before,
html.hgi-font-pending #sidebar .nav-link.active .hgi-stroke::before,
html.hgi-font-pending .nav-link.active .hgi-stroke::before {
    border-radius: 0 !important;
}

.sidebar-link .hgi-stroke,
.mobile-nav-link .hgi-stroke {
    font-size: 1.15rem;
    line-height: 1;
    vertical-align: -0.1em;
}

.pago-metodo-icon.hgi-stroke {
    font-size: 1.45rem;
    line-height: 1;
}
