/* ==========================================================
   CSS VARIABLES
========================================================== */

:root {
    /* Colors */
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;

    --background: #ffffff;
    --surface: #ffffff;

    --text: #222;
    --text-light: #666;

    --border: #dddddd;

    /* Fonts */
    --font-family: "Segoe UI", Arial, Helvetica, sans-serif;

    /* Sizes */
    --max-width: 1200px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;

    /* Effects */
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
}


/* ==========================================================
   RESET - no default styles
========================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{

    height:100%;
    scroll-behavior:smooth;

}

body{

    min-height:100vh;

    display:flex;
    flex-direction:column;

    font-family:var(--font-family);
    font-size:16px;
    line-height:1.5;

    color:var(--text);
    background:var(--background);

}

/* ==========================================================
   TYPOGRAPHY
========================================================== */

h1,h2,h3,h4,h5,h6{
    margin-bottom:var(--space-md);
    font-weight:600;
}

p{
    margin-bottom:var(--space-md);
}

a{
    color:var(--primary);
    text-decoration:none;
}

a:hover{
    text-decoration:underline;
}

/* ==========================================================
   HEADER
========================================================== */

.header{
    height:70px;
    background:#f80101;
    display:flex;
    align-items:center;
    padding:0 20px;
    color:white;
    box-shadow:0 2px 6px rgba(0,0,0,.15);
}

.logo{
    height:42px;
    width:auto;
    margin-right:15px;
}

.header h1{
    margin:0;
    font-size:1.4rem;
    font-weight:600;
}

.settings{
    height:20px;
    width:auto;
    filter: brightness(0) invert(1);
    margin-left:auto;
    cursor:pointer;
}

/* ==========================================================
   FOOTER
========================================================== */

.footer{
    background:#333;
    color:white;
    padding:8px 20px;
    text-align:center;
    font-size:0.9rem;
}

/* ==========================================================
   LAYOUT
========================================================== */

.container{
    max-width:var(--max-width);
    margin:auto;
    padding:var(--space-lg);
}

header,
footer{
    padding:var(--space-lg);
    box-shadow:var(--shadow);
}

main{
    margin:var(--space-xl) auto;
}
/* ==========================================================
   NAVIGATION BAR
========================================================== */

.navbar{

    display:flex;
    justify-content:center;
    align-items:center;
    height:40px;
    background:white;
    border-bottom:1px solid #dddddd;
}

.navbar a{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    height:100%;
    color:#000000;
    text-decoration:none;
    transition:background-color .2s;
}

.navbar a:hover{
    color:#f80101;
}
/* ==========================================================
   SIDEBAR
========================================================== */

.app-layout{
    display:flex;
    flex:1;
}

.sidebar{
    flex:0 0 220px;
    background:#f3f2f1;
    padding:20px;
    border-right:1px solid #dddddd;
}

.filter-group{
    margin-bottom:16px;
}

.filter-group label{
    display:block;
    margin-bottom:6px;
    font-size:0.9rem;
    font-weight:600;
}

.filter-group select{
    width:100%;
}

.container{
    flex:1;
    padding:24px;
}
.filter-row{
    display:flex;
    gap:10px;
}

.filter-row .filter-group{
    flex:1;
}
/* ==========================================================
   BUTTONS
========================================================== */

button{
    cursor:pointer;
    border:none;
    padding:10px 18px;
    border-radius:var(--radius);
    background:var(--primary);
    color:white;
    transition:.2s;
}

button:hover{
    opacity:.9;
}


/* ==========================================================
   FORMS
========================================================== */

input,
select,
textarea{

    width:100%;
    padding:10px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    font-size:1rem;
}

label{
    display:block;
    margin-bottom:6px;
    font-weight:bold;
}


/* ==========================================================
   CARDS
========================================================== */

.card{

    background:var(--surface);
    padding:var(--space-lg);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    margin-bottom:var(--space-lg);
}


/* ==========================================================
   TABLES
========================================================== */

#csv-container{
    display:flex;
    justify-content:center;
    margin:40px auto;
}

#csv-container table{
    border-collapse:collapse;
    background:white;
    width:auto;
    min-width:600px;
}

#csv-container th,
#csv-container td{
    border:1px solid #ccc;
    padding:8px 12px;
    text-align:left;
}

#csv-container th{
    background:#f0f0f0;
}

/* Estilo general para el resto de tablas */
table{
    width:100%;
    border-collapse:collapse;
}

th,
td{
    padding:12px;
    border:1px solid var(--border);
}

th{
    background:#efefef;
}

/* ==========================================================
   UTILITIES
========================================================== */

.text-center{
    text-align:center;
}

.text-right{
    text-align:right;
}

.hidden{
    display:none;
}

.mt{
    margin-top:var(--space-lg);
}

.mb{
    margin-bottom:var(--space-lg);
}

.flex{
    display:flex;
}

.flex-between{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.gap{
    gap:var(--space-md);
}