/* Variables de Diseño */
:root {
    --primary: #2563eb;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navegación */
nav {
    background: #1e293b;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav h1 { font-size: 1.2rem; font-weight: 600; }

nav ul { display: flex; list-style: none; gap: 1.5rem; }

nav a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; transition: 0.3s; }

nav a:hover { color: white; }

/* Contenedor Principal */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header { margin-bottom: 2rem; }

header h2 { font-size: 1.8rem; color: #0f172a; }

/* Tarjetas y Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Estados Visuales (Semáforo de Egreso) */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: #dcfce7; color: #166534; }   /* Verde */
.status-warning { background: #fef9c3; color: #854d0e; }  /* Amarillo */
.status-finished { background: #f1f5f9; color: #475569; } /* Gris */

/* Tablas de Datos */
.table-container {
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.3rem .2rem;
    border-bottom: 1px solid var(--border);
}

th { background: #f1f5f9; font-weight: 600; font-size: 0.85rem; }

/* Formularios */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #1d4ed8; }