* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f5; color: #333; line-height: 1.6;
}
.navbar {
    background-color: #2c3e50; padding: 0 2rem; display: flex;
    align-items: center; gap: 2rem; height: 56px;
    position: sticky; top: 0; z-index: 100;
}
.nav-brand a { color: white; text-decoration: none; font-size: 1.1rem; font-weight: 600; white-space: nowrap; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
    color: #bdc3c7; text-decoration: none; padding: 0.5rem 0.75rem;
    border-radius: 6px; font-size: 0.9rem; transition: background-color 0.2s, color 0.2s;
}
.nav-link:hover { background-color: #34495e; color: white; }
.container { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
h1 { font-size: 1.75rem; margin-bottom: 1.5rem; color: #2c3e50; }
h2 { font-size: 1.3rem; margin-bottom: 1rem; color: #34495e; }
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 2rem;
}
.card {
    background: white; border-radius: 10px; padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-left: 4px solid #ccc;
}
.card-blue { border-left-color: #3498db; }
.card-green { border-left-color: #27ae60; }
.card-red { border-left-color: #e74c3c; }
.card-number { font-size: 2.5rem; font-weight: 700; color: #2c3e50; }
.card-label { font-size: 0.9rem; color: #7f8c8d; margin-top: 0.25rem; }
.card-option {
    text-decoration: none; color: inherit; border-left: 4px solid #3498db;
    transition: transform 0.15s, box-shadow 0.15s; cursor: pointer;
}
.card-option:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.card-option-title { font-size: 1.1rem; font-weight: 600; color: #2c3e50; margin-bottom: 0.25rem; }
.card-option-desc { font-size: 0.85rem; color: #7f8c8d; }
.card-option-disabled { border-left-color: #bdc3c7; opacity: 0.6; pointer-events: none; }
.section {
    background: white; border-radius: 10px; padding: 1.5rem;
    margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.section p { margin-bottom: 0.75rem; color: #555; }

/* Form rows — grid layout for form fields side by side */
.form-row {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1rem; margin-bottom: 0.5rem;
}
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

/* Step indicator */
.step-indicator { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.step { color: #95a5a6; font-weight: 500; }
.step.active { color: #2c3e50; font-weight: 600; }
.step.done { color: #27ae60; }
.step-arrow { color: #bdc3c7; }

/* Progress bar */
.progress-bar-container {
    background: #ecf0f1; border-radius: 6px; height: 10px;
    margin-top: 0.75rem; overflow: hidden;
}
.progress-bar {
    background: #27ae60; height: 100%; border-radius: 6px;
    transition: width 0.3s ease;
}

/* Detail grid */
.detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}
.detail-item { display: flex; flex-direction: column; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.detail-label { font-size: 0.8rem; color: #7f8c8d; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 1rem; color: #2c3e50; font-weight: 500; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; color: #2c3e50; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover { background-color: #f8f9fa; }

.btn {
    display: inline-block; padding: 0.5rem 1rem; border: none;
    border-radius: 6px; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: #3498db; color: white; }
.btn-success { background: #27ae60; color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn-secondary { background: #95a5a6; color: white; }

.badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.badge-manual { background: #d5f5e3; color: #1e8449; }
.badge-qr { background: #d6eaf8; color: #1a5276; }
.badge-coming { background: #fdebd0; color: #935116; margin-top: 0.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.9rem; color: #2c3e50; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.95rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

.footer { text-align: center; padding: 1.5rem; color: #95a5a6; font-size: 0.85rem; margin-top: 2rem; }

/* Corral cards grid */
.corral-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem; margin-bottom: 1.5rem;
}
.corral-card {
    background: white; border-radius: 10px; padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-left: 4px solid #3498db;
    text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.corral-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.corral-card-active { border-left-color: #2c3e50; box-shadow: 0 0 0 2px #2c3e50; }
.corral-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.corral-card-name { font-weight: 600; color: #2c3e50; font-size: 0.95rem; }
.corral-card-count { font-weight: 700; color: #2c3e50; font-size: 1.1rem; }
.corral-bar-bg { background: #ecf0f1; border-radius: 4px; height: 6px; overflow: hidden; }
.corral-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.corral-card-footer { font-size: 0.75rem; color: #95a5a6; margin-top: 0.4rem; }

/* Badge pill */
.badge-pill {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; background: #eaf2f8; color: #2c3e50;
}

/* Clasificacion cards */
.clasif-card {
    border: 1px solid #eee; border-radius: 8px; padding: 1rem;
    margin-bottom: 0.75rem; transition: background 0.15s;
}
.clasif-card:hover { background: #fafafa; }
.clasif-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.clasif-nombre { font-weight: 600; color: #2c3e50; font-size: 1rem; }
.clasif-total { font-size: 0.85rem; color: #7f8c8d; }
.clasif-promedio { font-size: 0.85rem; color: #27ae60; font-weight: 500; margin-left: auto; }

/* Weight range pills */
.rangos-grid { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.rango-pill {
    display: flex; gap: 0.4rem; align-items: center;
    background: #eaf2f8; border-radius: 6px; padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}
.rango-peso { color: #2c3e50; font-weight: 600; }
.rango-cantidad {
    background: #3498db; color: white; border-radius: 10px;
    padding: 0 0.4rem; font-size: 0.75rem; font-weight: 600;
}
.rango-prom { color: #7f8c8d; font-size: 0.75rem; }
