﻿:root {
    --primary: #6c5ce7;
    --secondary: #00cec9;
    --dark: #2d3436;
    --light: #f5f6fa;
    --gray: #636e72;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --primary-color: #4361ee;
    --hover-color: #3a56d4;
    --badge-color: #f72585;
    --text-color: #2b2d42;
    --light-bg: #f8f9fa;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease, color 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
}

/* Navbar */
.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.19rem 2%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    z-index:1000;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.container {
    padding: 0.8rem 8%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}


.section-title {
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex-grow: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.table-container {
    max-height: 550px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

    /* Estilos para la barra de scroll */
    .table-container::-webkit-scrollbar {
        width: 8px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }

        .table-container::-webkit-scrollbar-thumb:hover {
            background: var(--secondary);
        }


.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

    .table th,
    .table td {
        padding: 0.35rem 1.5rem;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .table th {
        background: rgba(108, 92, 231, 0.1);
        color: var(--primary);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    .table tr:last-child td {
        border-bottom: none;
    }

    .table tr:hover {
        background: rgba(108, 92, 231, 0.03);
    }

    .table thead tr {
        position: sticky;
        top: 0;
        z-index: 1;
    }

thead th {
    position: sticky;
    top: 0;
    background-color: #f0f0f0;
    z-index: 1;
    border-bottom: 2px solid #ccc;
}

.text-danger {
    color: #e74c3c; /* rojo fuerte */
    font-size: 0.875rem; /* un poco más pequeño que el texto normal */
    margin-top: 0.25rem;
    display: block;
}


.finance-card{
    background: white;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(0,0,0,0.5);
    width:100%;
    max-width: 800px;
    padding:3px;
    transition:all 0.3s ease;
}

.finance-card:hover{
    box-shadow:0 15px 35px rgba(0,0,0,0.1);
}

.card-header{
    margin-bottom:30px;
}

.card-header h2{
    font-size:1.5rem;
    font-weight:600;
    color:var(--dark);
}

.card-header p{
    color:var(--gray);
    font-size:0.9rem;
    margin-top:5px;
}

.metric-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px, 1fr));
    gap:20px;
}

.metric-item{
    padding:20px;
    border-radius:12px;
    background:var(--light);
}

.metric-tittle{
    display:flex;
    align-items:center;
    margin-bottom:10px;
    font-size:0.85rem;
    font-weight:500;
    color:var(--gray);
}

.metric-tittle svg{
    margin-right:8px;
    width:18px;
    height:18px;
}

.metric-value{
    font-size:1.8rem;
    font-weight:600;
    margin-bottom: 5px;
}

.metric-change{
    font-size:0.85rem;
    display:flex;
    align-items:center;

}

.up{
    color:var(--success);
}

.down{
    color:var(--danger);
}
.sales{
    border-left: 4px solid var(--primary);
}

.profit{
    border-left: 4px solid var(--success);
}
.costs{
    border-left:4px solid var(--danger);
}
.margin {
    border-left:4px solid var(--warning);
}
@media(max-width:768px){
    .metric-grid{
        grid-template-columns:1fr 1fr;
    }

}

@media(max-width:480px){
    .metric-grid{
        grid-template-columns:1fr;
    }
    .finance-card{
        padding:20px
    }
}


@media (max-height : 768px) {
    .table-container {
        max-height: 400px;
    }
}

@media (max-height : 750px) {
    .table-container {
        max-height: 300px;
    }
}

