:root {
    --primary-color: #37D10D;
    --secondary-color: #6c757d;
    --bg-color: #f4f6f9;
    --text-color: #212529;
    --border-radius-lg: 1.5rem;
    --border-radius-md: 1rem;
    --border-radius-sm: 0.5rem;
}

body {
    background: linear-gradient(180deg, #f4f6f9, #e9edf3);
    background-attachment: fixed;
    font-family: system-ui, -apple-system, sans-serif;
    padding-bottom: 80px;
    min-height: 100vh;
	height: 100vh;
    margin: 0;
    color: var(--text-color);
}

/* --- HEADER --- */
.app-header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* --- FOOTER --- */
.app-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #dee2e6;
    text-align: center;
    padding: .7rem;
    font-size: .8rem;
    color: var(--secondary-color);
    z-index: 1000;
}

/* --- BUTTONS --- */
.btn-primary-custom,
.btn-success {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(55, 209, 13, 0.2);
    color: white;
}

.btn-primary-custom:hover,
.btn-success:hover {
    background: #2fb80b;
    border-color: #2fb80b;
}

.btn-google-pro {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 14px;
    transition: all 0.2s ease-in-out;
}

.btn-google-pro img {
    margin-bottom: 1px;
}

.btn-google-pro:hover {
    background-color: #f8f9fa;
    border-color: #c6c6c6;
    transform: translateY(-1px);
}

.btn-google-pro:active {
    transform: scale(0.98);
}

.btn-google-pro:focus {
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25);
}


.btn-secondary-custom {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    border-radius: var(--border-radius-md);
    padding: 0.8rem;
    font-weight: 700;
    color: white;
}

/* --- CARDS & PANELS --- */
.card {
    border-radius: var(--border-radius-lg);
    border: none;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1rem;
    animation: fadeUp 0.4s ease forwards;
}

.card-body {
    padding: 1.5rem;
}

/* --- HOME BUTTONS (Menu principal) --- */
.home-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 1.2rem 1.3rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-btn:active {
    transform: scale(0.98);
}

.home-btn i {
    font-size: 1.8rem;
    color: var(--primary-color);
    min-width: 36px;
    text-align: center;
}

.home-btn span {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-color);
    display: block;
}

.home-btn small {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

@media (hover: hover) {
    .home-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    }
}

/* --- LIST ITEMS --- */
.lista-card {
    border-radius: 1.2rem;
    border: none;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    margin-bottom: 1rem;
    width: 100%;
}

.lista-card:active {
    transform: scale(0.98);
}

.lista-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: rgba(55, 209, 13, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.date-badge {
    background: #f8f9fa;
    color: var(--secondary-color);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* --- CHECKLIST PROFILE --- */
.profile-checklist-card {
    border-radius: var(--border-radius-lg);
}

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

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0.4rem;
}

.checklist li.completed {
    opacity: 1;
    font-weight: 600;
}

/* --- UTILS --- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner-modern {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-right: 4px solid var(--primary-color);
    border-bottom: 4px solid #ffc107;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SWEET ALERT --- */
.swal2-popup {
    border-radius: 2rem !important;
    padding: 2rem !important;
    font-family: system-ui !important;
}

.swal2-styled.swal2-confirm {
    border-radius: 1rem !important;
    background-color: var(--primary-color) !important;
    padding: 0.8rem 2rem !important;
    font-weight: 600 !important;
}

/* --- CODE INPUTS --- */
.code-inputs {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.code-inputs input {
    width: 100%;
    height: 55px;
    font-size: 1.6rem;
    text-align: center;
    border-radius: 1rem;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}


/* --- FILTROS & BUSQUEDA --- */
.filter-card {
    border-radius: var(--border-radius-lg);
    border: none;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
    margin-top: -20px;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border-radius: 0.8rem;
    padding: 0.5rem 1.2rem;
    border: none;
}

.form-control,
.form-select {
    border-radius: 0.8rem;
    border: 2px solid #f1f3f5;
    background-color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(55, 209, 13, 0.15);
}

/* --- PRODUCT DETAILS --- */
.product-card {
    background: #fff;
    border: 1px solid rgba(238, 241, 244, 0.7);
    border-left: 5px solid var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.product-name {
    font-weight: 700;
    font-size: 1rem;
}

.product-category {
    font-size: .8rem;
    color: var(--secondary-color);
}

.total-card {
    background: linear-gradient(135deg, #37D10D, #2fb80b);
    color: #fff;
    border-radius: 1.5rem;
}

.total-amount {
    font-size: 2rem;
    font-weight: 800;
}

.estado-ok {
    background: rgba(255, 255, 255, .15);
    padding: .4rem .9rem;
    border-radius: 1rem;
    font-size: .9rem;
    font-weight: 600;
}

.estado-error {
    background: rgba(220, 53, 69, .9);
    padding: .4rem .9rem;
    border-radius: 1rem;
    font-size: .9rem;
    font-weight: 700;
}

/* --- BOTTOM NAV --- */
.nav-fixed-bottom {
    position: fixed;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .6rem;
    background: #fff;
    padding: .5rem;
    border-radius: 1.2rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    z-index: 999;
}

.nav-fixed-bottom button {
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    padding: .6rem .9rem;
    border-radius: .9rem;
    font-size: .85rem;
}

#btnVoz.listening {
    background: #dc3545;
    color: #fff;
    animation: pulse 1s infinite;
}

.grafico-wrapper {
  max-width: 500px;
  width: 100%;
  height: 500px;
  margin: 0 auto;
  position: relative;
}

/* Mobile friendly */
@media (max-width: 576px) {
  .grafico-wrapper {
    height: 320px;
  }
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, .6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}