:root {
    --primary: #2563eb;
    --secondary: #0f172a;
    --sidebar: #0b1120;
    --sidebar-light: #111827;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --radius: 22px;
}

body.novapos-body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--text);
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    background:
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #111827 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 18px 0 50px rgba(15, 23, 42, .22);
    z-index: 1000;
}

/* Scroll bonito */
.sidebar-body::-webkit-scrollbar {
    width: 14px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, .35);
    border-radius: 999px;
}

.sidebar-header {
    height: 88px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 30px rgba(37, 99, 235, .45);
}

.logo-info h3 {
    margin: 0;
    font-weight: 800;
    font-size: 20px;
}

.logo-info small {
    color: #93c5fd;
    font-size: 12px;
}

.btn-sidebar,
.btn-icon {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    margin: 22px 14px 10px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 6px;
    transition: .22s ease;
    position: relative;
}

.menu a i {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.menu a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transform: translateX(4px);
}

.menu a.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

.menu, li {
    list-style: none;

}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar,
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.main-content {
    margin-left: 290px;
    width: calc(100% - 290px);
    min-height: 100vh;
}

.topbar {
    height: 82px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar .btn-icon {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* BUSCADOR GLOBAL*/
.global-search-wrapper {
    position: relative;
}

.global-search-results {
    position: absolute;
    top: 58px;
    left: 0;
    width: 520px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .18);
    overflow: hidden;
    z-index: 2000;
}

.global-search-item {
    display: flex;
    gap: 14px;
    padding: 15px 18px;
    text-decoration: none;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    transition: .2s;
}

.global-search-item:hover {
    background: #f8fafc;
}

.global-search-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #2563eb;
    flex-shrink: 0;
}

.global-search-item strong {
    display: block;
    font-size: 14px;
}

.global-search-item span {
    color: #64748b;
    font-size: 13px;
}

.global-search-empty {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
}

body.dark-mode .global-search-results {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .global-search-item {
    color: #f8fafc;
    border-bottom-color: #1e293b;
}

body.dark-mode .global-search-item:hover {
    background: #1e293b;
}

/* FIN */


.search-box {
    height: 46px;
    min-width: 420px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.user-dropdown {
    border: none;
    background: #fff;
    border-radius: 18px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}

.user-data {
    text-align: left;
}

.user-data strong {
    display: block;
    font-size: 13px;
}

.user-data small {
    color: #64748b;
    font-size: 11px;
}

.content-wrapper {
    padding: 30px;
}

.footer {
    padding: 18px 30px;
    color: #64748b;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nova-card,
.kpi-card {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(226, 232, 240, .85);
    border-radius: 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.nova-card-header {
    padding: 20px 24px;
    font-weight: 800;
    border-bottom: 1px solid #eef2f7;
}

.nova-card-body {
    padding: 24px;
}

.kpi-card {
    padding: 26px;
    position: relative;
    overflow: hidden;
    transition: .25s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.kpi-title {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.kpi-value {
    font-size: 32px;
    font-weight: 900;
    margin-top: 8px;
}

.kpi-icon {
    position: absolute;
    right: 22px;
    top: 22px;
    font-size: 48px;
    opacity: .10;
}

.btn,
.form-control,
.form-select {
    border-radius: 14px;
}

.modal-content {
    border-radius: 26px;
    border: none;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .35);
}

.table {
    vertical-align: middle;
}

.loader-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: grid;
    place-items: center;
}

.loader-content {
    background: #fff;
    padding: 32px 44px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .3);
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .25s;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .search-box {
        min-width: 220px;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 999;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }
}



/*  lOGIN  */

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .25), transparent 35%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, .22), transparent 35%),
        linear-gradient(135deg, #020617, #0f172a);
    font-family: 'Inter', sans-serif;
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, .96);
    border-radius: 30px;
    padding: 42px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .35);
}

.auth-logo {
    text-align: center;
    margin-bottom: 22px;
}

.auth-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 24px;
}

.auth-card h1 {
    text-align: center;
    font-weight: 900;
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
}

.auth-input {
    height: 52px;
    border-radius: 16px;
}

.remember {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #475569;
}

.forgot {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.btn-auth {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(37, 99, 235, .35);
}



/* FIN */


body.dark-mode {
    --bg: #020617;
    --card: #0f172a;
    --text: #f8fafc;
    background: #020617;
    color: #f8fafc;
}

body.dark-mode .topbar,
body.dark-mode .nova-card,
body.dark-mode .kpi-card,
body.dark-mode .user-dropdown,
body.dark-mode .topbar .btn-icon {
    background: rgba(15, 23, 42, .92);
    color: #f8fafc;
    border-color: rgba(51, 65, 85, .8);
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .search-box {
    background: #020617;
    color: #f8fafc;
    border-color: #334155;
}

body.dark-mode .table {
    color: #f8fafc;
}

body.dark-mode .dropdown-menu {
    background: #0f172a;
}

body.dark-mode .dropdown-item {
    color: #e2e8f0;
}

body.dark-mode .dropdown-item:hover {
    background: #1e293b;
}


/* NOTIFICACIONES */
.notification-dropdown {
    width: 390px;
    padding: 0;
    overflow: hidden;
}

.notification-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header small {
    color: #64748b;
}

.notification-list {
    max-height: 420px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    text-decoration: none;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    transition: .2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #fef3c7;
    color: #d97706;
    font-size: 20px;
}

.notification-item strong {
    display: block;
    font-size: 14px;
}

.notification-item p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #64748b;
}

.notification-empty {
    padding: 38px 20px;
    text-align: center;
    color: #64748b;
}

.notification-empty i {
    font-size: 38px;
    opacity: .5;
}

body.dark-mode .notification-dropdown {
    background: #0f172a;
}

body.dark-mode .notification-header {
    border-bottom-color: #334155;
}

body.dark-mode .notification-item {
    color: #f8fafc;
    border-bottom-color: #1e293b;
}

body.dark-mode .notification-item:hover {
    background: #1e293b;
}

/* FIN */



/* DASHBOARD */
.premium-hero {
    min-height: 190px;
    padding: 34px;
    border-radius: 32px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 28%),
        linear-gradient(135deg, #2563eb, #7c3aed 55%, #0f172a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 28px 80px rgba(37, 99, 235, .35);
    position: relative;
    overflow: hidden;
}

.premium-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    bottom: -120px;
    background: rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.premium-hero h1 {
    font-size: 38px;
    font-weight: 900;
    margin: 0 0 8px;
}

.premium-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 16px;
}

.hero-clock {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    padding: 14px 18px;
    border-radius: 20px;
    font-weight: 800;
}

.premium-kpi {
    min-height: 170px;
}

.kpi-subtitle {
    color: #94a3b8;
    font-weight: 600;
    margin-top: 8px;
}

.kpi-green {
    border-left: 5px solid #22c55e;
}

.kpi-blue {
    border-left: 5px solid #2563eb;
}

.kpi-purple {
    border-left: 5px solid #7c3aed;
}

.kpi-red {
    border-left: 5px solid #ef4444;
}

.cash-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
}

.cash-status i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 24px;
}

.cash-status.active {
    background: #dcfce7;
    color: #166534;
}

.cash-status.active i {
    background: #22c55e;
    color: #fff;
}

.cash-status.inactive {
    background: #fef3c7;
    color: #92400e;
}

.cash-status.inactive i {
    background: #f59e0b;
    color: #fff;
}

.cash-status strong {
    display: block;
}

.cash-status span {
    font-size: 13px;
}

.activity-item,
.stock-alert-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.activity-item:last-child,
.stock-alert-item:last-child {
    border-bottom: none;
}

.activity-icon,
.stock-alert-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    flex-shrink: 0;
}

.activity-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.stock-alert-icon {
    background: #fee2e2;
    color: #dc2626;
}

.activity-content,
.stock-alert-content {
    flex: 1;
}

.activity-content strong,
.stock-alert-content strong {
    display: block;
}

.activity-content span,
.stock-alert-content span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.activity-amount {
    font-weight: 900;
    color: #16a34a;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.empty-state i {
    font-size: 46px;
    display: block;
    margin-bottom: 12px;
}

.dashboard-client-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-client-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
}

.dashboard-client-rank {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-client-info strong {
    display: block;
    font-weight: 900;
    color: #0f172a;
}

.dashboard-client-info small {
    color: #64748b;
}

.dashboard-client-stats {
    text-align: right;
}

.dashboard-client-stats span {
    display: block;
    font-size: .78rem;
    color: #64748b;
    font-weight: 700;
}

.dashboard-client-stats strong {
    color: #16a34a;
}

body.dark-mode .dashboard-client-item {
    background: rgba(15, 23, 42, .85);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .dashboard-client-info strong {
    color: #f8fafc;
}

/* FIN */

/* AUDITORIAS */
.activity-timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding: 18px 0;
    border-bottom: 1px solid #eef2f7;
}

.activity-timeline-item:last-child {
    border-bottom: none;
}

.activity-timeline-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .25);
}

.activity-timeline-content {
    flex: 1;
}

body.dark-mode .activity-timeline-item {
    border-bottom-color: #1e293b;
}

/* FIN */

/* punto de venta  */

.pos-wrapper {
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 24px;
    height: calc(100vh - 140px);
}

.pos-products,
.pos-cart {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 30px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.pos-products {
    display: flex;
    flex-direction: column;
}

.pos-header {
    padding: 24px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-header h2 {
    font-weight: 900;
    margin: 0;
}

.pos-header small {
    color: #64748b;
}

.pos-search-panel {
    padding: 18px 24px;
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 16px;
    border-bottom: 1px solid #eef2f7;
}

.pos-search-box,
.pos-barcode-box {
    height: 54px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 18px;
}

.pos-search-box i,
.pos-barcode-box i {
    color: #2563eb;
    font-size: 22px;
}

.pos-search-box input,
.pos-barcode-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.pos-product-grid {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.pos-loading {
    height: 100%;
    display: grid;
    place-items: center;
    color: #64748b;
}

.pos-cart {
    display: flex;
    flex-direction: column;
}

.pos-cart-header {
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-header h4 {
    margin: 0;
    font-weight: 900;
}

.pos-cart-header small {
    color: rgba(255, 255, 255, .75);
}

.pos-cart-header i {
    font-size: 42px;
    opacity: .35;
}

.pos-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.pos-totals {
    padding: 22px;
    border-top: 1px solid #eef2f7;
    background: #f8fafc;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #64748b;
}

.pos-total-row strong {
    color: #0f172a;
}

.pos-total-row.total {
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    border-top: 1px dashed #cbd5e1;
    padding-top: 14px;
    margin-top: 14px;
}

.pos-total-row.total strong {
    color: #16a34a;
}

body.pos-fullscreen .sidebar,
body.pos-fullscreen .topbar,
body.pos-fullscreen .footer {
    display: none !important;
}

body.pos-fullscreen .main-content {
    margin-left: 0;
    width: 100%;
}

body.pos-fullscreen .content-wrapper {
    padding: 14px;
}

body.pos-fullscreen .pos-wrapper {
    height: calc(100vh - 28px);
}

@media (max-width: 1200px) {
    .pos-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-cart {
        min-height: 520px;
    }

    .pos-search-panel {
        grid-template-columns: 1fr;
    }
}


.pos-grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}

.pos-product-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
    transition: .22s ease;
}

.pos-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .12);
}

.pos-product-image {
    height: 150px;
    position: relative;
    background: #f8fafc;
}

.pos-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}

.pos-badge.agotado {
    background: #dc2626;
}

.pos-badge.bajo {
    background: #f59e0b;
}

.pos-product-info {
    padding: 16px;
}

.pos-product-info h5 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    min-height: 38px;
}

.pos-product-info small {
    color: #64748b;
}

.pos-product-meta {
    margin: 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-product-meta span {
    color: #64748b;
    font-size: 12px;
}

.pos-product-meta strong {
    color: #16a34a;
    font-size: 18px;
}


.pos-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-cart-item {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.cart-item-info strong {
    display: block;
    font-size: 14px;
}

.cart-item-info small {
    color: #64748b;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cart-action {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 12px;
    background: #eef2ff;
    color: #2563eb;
    display: grid;
    place-items: center;
}

.cart-qty {
    min-width: 45px;
    text-align: center;
    font-weight: 800;
}

.cart-item-total {
    font-weight: 900;
    color: #16a34a;
    white-space: nowrap;
}

.btn-cart-delete {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 13px;
    background: #fee2e2;
    color: #dc2626;
    display: grid;
    place-items: center;
}

@media (max-width: 600px) {
    .pos-cart-item {
        grid-template-columns: 1fr auto;
    }

    .cart-item-actions,
    .cart-item-total,
    .btn-cart-delete {
        grid-column: span 1;
    }
}



.modal-cobro-premium {
    border: none;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 40px 110px rgba(15, 23, 42, .45);
}

.cobro-premium-header {
    padding: 28px 32px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 30%),
        linear-gradient(135deg, #0f172a, #2563eb 55%, #7c3aed);
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.cobro-badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    padding: 7px 13px;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 14px;
}

.cobro-premium-header h3 {
    font-weight: 900;
    margin: 0;
}

.cobro-premium-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .75);
}

.cobro-layout {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 0;
}

.cobro-left {
    padding: 28px;
}

.cobro-right {
    padding: 28px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

.cobro-total-card {
    border-radius: 28px;
    padding: 28px;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #16a34a, #0f766e);
    box-shadow: 0 20px 55px rgba(22, 163, 74, .25);
}

.cobro-total-card span {
    display: block;
    opacity: .8;
    font-weight: 700;
}

.cobro-total-card strong {
    display: block;
    font-size: 52px;
    font-weight: 900;
    margin-top: 6px;
}

.payment-methods {
    margin: 22px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.payment-method {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 22px;
    padding: 18px 10px;
    text-align: center;
    transition: .2s;
}

.payment-method i {
    display: block;
    font-size: 28px;
    color: #2563eb;
    margin-bottom: 8px;
}

.payment-method span {
    font-weight: 800;
    font-size: 13px;
}

.payment-method.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 18px 45px rgba(37, 99, 235, .28);
    transform: translateY(-3px);
}

.payment-method.active i {
    color: #fff;
}

.payment-input-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 22px;
}

.payment-input-card label {
    font-weight: 800;
    margin-bottom: 8px;
}

.monto-input {
    height: 70px;
    font-size: 36px;
    font-weight: 900;
    text-align: right;
    border-radius: 22px;
}

.change-premium {
    margin-top: 16px;
    border-radius: 20px;
    padding: 16px 18px;
    background: #dcfce7;
    color: #166534;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.change-premium span {
    font-weight: 800;
}

.change-premium strong {
    font-size: 26px;
    font-weight: 900;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.key {
    height: 72px;
    border: none;
    border-radius: 22px;
    background: #fff;
    font-size: 25px;
    font-weight: 900;
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    transition: .15s;
}

.key:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

.key.secondary {
    font-size: 15px;
    background: #e0e7ff;
    color: #3730a3;
}

.key.danger {
    background: #fee2e2;
    color: #dc2626;
}

.key.success {
    font-size: 16px;
    background: linear-gradient(135deg, #16a34a, #0f766e);
    color: #fff;
}

.detalle-cobro {
    max-height: 210px;
    overflow-y: auto;
}

@media (max-width: 992px) {
    .cobro-layout {
        grid-template-columns: 1fr;
    }

    .cobro-right {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}


.pos-client-panel {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08));
    border: 1px solid rgba(37, 99, 235, .12);
}

.client-selected-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

body.dark-mode .pos-client-panel {
    background: rgba(15, 23, 42, .72);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .client-selected-card {
    background: rgba(15, 23, 42, .95);
    border-color: rgba(148, 163, 184, .18);
}


.pos-offline-status {
    padding: 8px 10px;
    border-radius: 16px;
    font-weight: 800;
    font-size: .7rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.pos-offline-status i {
    font-size: 1.6rem;
    color: #ffffff !important;
}

.pos-offline-status.online {
    background: rgba(22, 163, 74, .10);
    color: #15803d;
    border-color: rgba(22, 163, 74, .22);
}

.pos-offline-status.offline {
    background: rgba(220, 38, 38, .10);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, .22);
}

.pos-offline-status.syncing {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
    border-color: rgba(245, 158, 11, .24);
}

body.dark-mode .pos-offline-status.online,
body.dark-mode .pos-offline-status.offline,
body.dark-mode .pos-offline-status.syncing {
    background: rgba(15, 23, 42, .85);
}


/* Fin */


/* Comandos */
.command-modal {
    border: none;
    border-radius: 28px;
    overflow: hidden;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 45px 120px rgba(15, 23, 42, .55);
}

.command-search {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.command-search i {
    font-size: 28px;
    color: #60a5fa;
}

.command-search input {
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    width: 100%;
    font-size: 20px;
    font-weight: 700;
}

.command-search input::placeholder {
    color: #64748b;
}

.command-list {
    padding: 14px;
    max-height: 520px;
    overflow-y: auto;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 18px;
    transition: .18s;
}

.command-item:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.command-item i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 22px;
}

.command-item strong {
    display: block;
    font-size: 15px;
}

.command-item span {
    display: block;
    font-size: 13px;
    color: #94a3b8;
}

/* Fin*/


/* DASBOARD TARJETAS INTELIGENTES */
.smart-insight-card {
    height: 100%;
    min-height: 150px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
    transition: .22s;
}

.smart-insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 65px rgba(15, 23, 42, .12);
}

.smart-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 27px;
    flex-shrink: 0;
}

.smart-icon.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.smart-icon.primary {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.smart-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.smart-icon.purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.smart-insight-card small {
    color: #64748b;
    font-weight: 700;
}

.smart-insight-card h4 {
    margin: 4px 0;
    font-weight: 900;
    font-size: 20px;
}

.smart-insight-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

body.dark-mode .smart-insight-card {
    background: rgba(15, 23, 42, .92);
    border-color: #334155;
}

/* FIN */

/* CLIENTES */
.client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(37, 99, 235, .25);
}

.loyalty-preview {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(124, 58, 237, .10));
    border: 1px solid rgba(37, 99, 235, .15);
}

.loyalty-preview span {
    display: block;
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.loyalty-preview h4 {
    margin: 0;
    font-weight: 900;
    color: #0f172a;
}

body.dark-mode .loyalty-preview {
    background: rgba(15, 23, 42, .8);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .loyalty-preview h4 {
    color: #f8fafc;
}

.client-profile-card {
    padding: 32px;
    text-align: center;
}

.client-profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 28px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 18px;
    box-shadow: 0 18px 40px rgba(37, 99, 235, .28);
}

.client-profile-card h3 {
    font-weight: 900;
    margin-bottom: 12px;
}

.loyalty-progress {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.loyalty-progress .progress-bar {
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.loyalty-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.loyalty-timeline-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
}

.loyalty-timeline-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

body.dark-mode .loyalty-timeline-item {
    background: rgba(15, 23, 42, .78);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .loyalty-progress {
    background: rgba(148, 163, 184, .22);
}

/* FIN */



/* DEVOLUCIONES */
.dev-info-box {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
}

.dev-info-box span {
    display: block;
    font-size: .75rem;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.dev-info-box strong {
    color: #0f172a;
    font-weight: 900;
}

.dev-total-card {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, .10), rgba(249, 115, 22, .10));
    border: 1px solid rgba(239, 68, 68, .18);
}

.dev-total-card span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.dev-total-card strong {
    font-size: 1.6rem;
    color: #dc2626;
    font-weight: 900;
}

body.dark-mode .dev-info-box {
    background: rgba(15, 23, 42, .85);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .dev-info-box strong {
    color: #f8fafc;
}

/* FIN */


/* OFFLINE */
.offline-device-preview {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(124, 58, 237, .10));
    border: 1px solid rgba(37, 99, 235, .16);
}

.offline-device-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .25);
}

.offline-device-preview span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.offline-device-preview strong {
    display: block;
    color: #0f172a;
    font-size: .82rem;
    word-break: break-all;
}

body.dark-mode .offline-device-preview {
    background: rgba(15, 23, 42, .85);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .offline-device-preview strong {
    color: #f8fafc;
}

.offline-sync-status {
    padding: 12px 14px;
    border-radius: 16px;
    font-size: .86rem;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
    color: #475569;
}

.offline-info {
    background: rgba(37, 99, 235, .08);
    border-color: rgba(37, 99, 235, .18);
    color: #1d4ed8;
}

.offline-success {
    background: rgba(22, 163, 74, .10);
    border-color: rgba(22, 163, 74, .20);
    color: #15803d;
}

.offline-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .24);
    color: #b45309;
}

.offline-error {
    background: rgba(220, 38, 38, .10);
    border-color: rgba(220, 38, 38, .20);
    color: #b91c1c;
}

.offline-local-panel {
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
}

.offline-sale-item {
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .22);
    margin-bottom: 10px;
}

.offline-sale-item strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.offline-sale-item small {
    color: #64748b;
}

.offline-sale-status {
    font-size: .72rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 999px;
}

.offline-sale-status.PENDIENTE {
    background: rgba(245, 158, 11, .15);
    color: #b45309;
}

.offline-sale-status.ERROR {
    background: rgba(220, 38, 38, .13);
    color: #b91c1c;
}

.offline-sale-status.SINCRONIZADO {
    background: rgba(22, 163, 74, .13);
    color: #15803d;
}

body.dark-mode .offline-local-panel,
body.dark-mode .offline-sale-item {
    background: rgba(15, 23, 42, .85);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .offline-sale-item strong {
    color: #f8fafc;
}

/* FIN */

/* REPORTES DE INVENTARIO */
.inventory-critical-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .22);
    margin-bottom: 10px;
}

.inventory-critical-item strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.inventory-critical-item small {
    color: #64748b;
}

body.dark-mode .inventory-critical-item {
    background: rgba(15, 23, 42, .85);
    border-color: rgba(148, 163, 184, .18);
}

body.dark-mode .inventory-critical-item strong {
    color: #f8fafc;
}

/* FIN */