 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    padding: 20px;
    padding-top: 100px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Pantalla de Login */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: slideDown 0.3s;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.login-header p {
    color: #718096;
    font-size: 1.1em;
}

.login-form {
    margin-top: 30px;
}

.login-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #fc8181;
    font-size: 0.9em;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-info p {
    color: #718096;
    font-size: 0.85em;
}

.nav-link-logout {
    background: rgba(245, 101, 101, 0.2) !important;
}

.nav-link-logout:hover {
    background: rgba(245, 101, 101, 0.3) !important;
}

/* Menú de Navegación Superior */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(240, 147, 251, 0.95) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 15px 20px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.navbar-brand h2 {
    color: white;
    font-size: 1.3em;
    margin: 0;
    white-space: nowrap;
    font-weight: 600;
}

.navbar-search {
    flex: 1;
    min-width: 250px;
    position: relative;
    max-width: 500px;
}

.search-input-nav {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s;
}

.search-input-nav:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-input-nav::placeholder {
    color: #718096;
}

.resultados-busqueda {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
    border: 1px solid #e2e8f0;
}

.resultados-busqueda.mostrar {
    display: block;
    animation: slideDown 0.3s;
}

.resultado-item {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resultado-item:hover {
    background: #f7fafc;
    transform: translateX(5px);
}

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

.resultado-item-info h4 {
    color: #667eea;
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.resultado-item-info p {
    color: #718096;
    margin: 0;
    font-size: 0.9em;
}

.resultado-item-acciones {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.resultado-item-precio {
    color: #48bb78;
    font-weight: bold;
    font-size: 1.1em;
}

.resultado-item-stock {
    color: #f56565;
    font-size: 0.85em;
    margin-top: 3px;
}

.btn-agregar-rapido {
    padding: 6px 12px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.btn-agregar-rapido:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-agregar-rapido:active {
    transform: translateY(0);
}

.resultado-vacio {
    padding: 30px;
    text-align: center;
    color: #718096;
}

.navbar-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    background: white;
    color: #667eea;
    font-weight: bold;
}

#lightRaysContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.light-rays-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    z-index: 4;
}

/* Header eliminado - ahora usamos solo el navbar superior */

main {
    padding: 30px;
    background: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #333;
    font-size: 2em;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(118, 75, 162, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(246, 173, 85, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 101, 101, 0.5);
}

.btn-secondary {
    background: #a0aec0;
    color: white;
}

.btn-secondary:hover {
    background: #718096;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 8px;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Widgets Grid */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.widget-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.widget-icon {
    font-size: 2.5em;
    line-height: 1;
}

.widget-info {
    flex: 1;
}

.widget-label {
    font-size: 0.85em;
    color: #718096;
    margin-bottom: 5px;
    font-weight: 500;
}

.widget-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.stock-bajo-widget {
    border-left: 5px solid #f6ad55;
}

.stock-critico-widget {
    border-left: 5px solid #fc8181;
}

/* Filtros Bar */
.filtros-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.filtros-left, .filtros-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtro-select {
    min-width: 180px;
    padding: 10px 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.card h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
}

.card p {
    color: #4a5568;
    margin: 8px 0;
}

.card .amount {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
}

.producto-card {
    position: relative;
    min-height: 280px;
}

.producto-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.producto-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.4em;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    white-space: nowrap;
}

.badge-critico {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.4);
}

.badge-bajo {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(246, 173, 85, 0.4);
}

.badge-ok {
    background: linear-gradient(135deg, #68d391 0%, #48bb78 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.4);
}

.producto-details {
    margin: 15px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.9em;
    color: #718096;
    font-weight: 500;
}

.detail-value {
    font-size: 1em;
    color: #2d3748;
    font-weight: 600;
}

.detail-value.precio {
    color: #48bb78;
    font-size: 1.1em;
}

.detail-value.stock.stock-bajo {
    color: #f6ad55;
    font-weight: bold;
}

.detail-value.stock.stock-critico {
    color: #fc8181;
    font-weight: bold;
}

.detail-value.valor-stock {
    color: #667eea;
    font-size: 1.1em;
    font-weight: bold;
}

.producto-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.stock-bajo {
    background: rgba(254, 215, 215, 0.9);
    backdrop-filter: blur(10px);
    border-color: #fc8181;
}

.stock-bajo::before {
    content: "⚠️ Stock Bajo";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fc8181;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.venta-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.venta-info {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.agregar-producto {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.agregar-producto h4 {
    width: 100%;
    margin-bottom: 10px;
    color: #333;
}

.input {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    flex: 1;
    min-width: 150px;
}

.items-venta {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.item-venta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

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

.venta-total {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.total-display h3 {
    font-size: 1.8em;
    color: #667eea;
    margin-bottom: 20px;
}

.cobro-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.cobro-inputs {
    margin-bottom: 20px;
}

.cobro-inputs label {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #667eea;
}

.input-large {
    width: 100%;
    max-width: 300px;
    padding: 15px;
    font-size: 1.5em;
    text-align: center;
    font-weight: bold;
    border: 3px solid #667eea;
    border-radius: 10px;
    margin: 10px auto;
    display: block;
}

.input-large:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.vuelto-display {
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.3em;
    transition: all 0.3s;
}

.vuelto-ok {
    background: rgba(72, 187, 120, 0.2);
    border: 2px solid #48bb78;
}

.vuelto-exacto {
    background: rgba(72, 187, 120, 0.15);
    border: 2px solid #48bb78;
}

.vuelto-falta {
    background: rgba(245, 101, 101, 0.2);
    border: 2px solid #f56565;
    animation: pulse-warning 1s infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.botones-cobro {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.botones-venta {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.historial-container {
    margin-top: 30px;
}

.resumen-gastos {
    margin-bottom: 30px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content.factura {
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.factura-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.factura-total {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #667eea;
}

.metricas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metrica-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.metrica-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metrica-icon {
    font-size: 3em;
    line-height: 1;
}

.metrica-info {
    flex: 1;
}

.metrica-label {
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 500;
}

.metrica-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.metrica-count {
    font-size: 0.85em;
    color: #48bb78;
    font-weight: 600;
}

.metrica-subtitle {
    font-size: 0.85em;
    color: #718096;
}

.metrica-card.ventas-hoy {
    border-left: 5px solid #48bb78;
}

.metrica-card.balance {
    border-left: 5px solid #667eea;
}

.metrica-card.productos-stock {
    border-left: 5px solid #f56565;
}

.metrica-card.promedio {
    border-left: 5px solid #764ba2;
}

.reportes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.stat-label {
    color: #718096;
    font-size: 0.9em;
}

.stat-value {
    color: #2d3748;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 5px;
}

/* Calculadora */
.calculadora-modal {
    max-width: 400px;
}

.calculadora {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calculadora-display {
    margin-bottom: 20px;
}

.calculadora-input {
    width: 100%;
    padding: 20px;
    font-size: 2em;
    text-align: right;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    color: #2d3748;
    font-weight: bold;
    box-sizing: border-box;
}

.calculadora-botones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 20px;
    font-size: 1.3em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calc-btn-number {
    background: #f7fafc;
    color: #2d3748;
}

.calc-btn-number:hover {
    background: #edf2f7;
}

.calc-btn-operator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calc-btn-operator:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
}

.calc-btn-clear {
    background: #f56565;
    color: white;
}

.calc-btn-clear:hover {
    background: #e53e3e;
}

.calc-btn-equals {
    background: #48bb78;
    color: white;
    grid-column: span 2;
}

.calc-btn-equals:hover {
    background: #38a169;
}

.calc-btn-zero {
    grid-column: span 2;
}

/* Dashboard */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.metric-icon {
    font-size: 3em;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    flex-shrink: 0;
}

.metric-primary .metric-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-success .metric-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-warning .metric-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-info .metric-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    color: #718096;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    margin: 5px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-change {
    font-size: 0.85em;
    color: #718096;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.chart-card canvas {
    max-height: 300px;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.summary-card h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.summary-item {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.alert-item {
    padding: 12px;
    border-left: 4px solid;
    border-radius: 8px;
    margin-bottom: 10px;
    background: rgba(254, 215, 215, 0.3);
    border-color: #f5576c;
}

@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }
    
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .dashboard-summary {
        grid-template-columns: 1fr;
    }
    
    .calculadora-modal {
        max-width: 95%;
    }
    
    .calculadora-botones {
        gap: 8px;
    }
    
    .calc-btn {
        padding: 15px;
        font-size: 1.1em;
    }

    .navbar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-search {
        max-width: 100%;
        min-width: 100%;
    }

    .navbar-links {
        justify-content: center;
    }

    .nav-link {
        font-size: 13px;
        padding: 8px 15px;
    }

    .navbar-brand h2 {
        font-size: 1.1em;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .agregar-producto {
        flex-direction: column;
    }
    
    .input {
        width: 100%;
    }
}

