/* ============================================
   VARIABLES Y RESET
============================================ */
:root {
    --f1-red: #e10600;
    --f1-dark: #15151e;
    --f1-gray: #2a2a38;
    --f1-light: #f0f0f0;
    --f1-accent: #00d2be;
    --f1-yellow: #ffd700;
    --f1-purple: #9000ff;
    --success: #00a35c;
    --warning: #ff9800;
    --danger: #ff3860;
    --info: #209cee;
    --font-title: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--f1-dark) 0%, #1a1a2e 100%);
    color: var(--f1-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   ANIMACIONES
============================================ */
@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   LAYOUT GENERAL
============================================ */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   COMPONENTES REUTILIZABLES
============================================ */
.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag.upcoming {
    background: rgba(0, 210, 190, 0.2);
    color: var(--f1-accent);
    border: 1px solid var(--f1-accent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(225, 6, 0, 0.3);
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    border-color: var(--f1-red);
}

.stat-card i {
    font-size: 1.5rem;
}

.stat-card.money i { color: var(--f1-yellow); }
.stat-card.points i { color: var(--f1-accent); }
.stat-card.ranking i { color: var(--f1-purple); }

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    font-family: var(--font-title);
}

.progress-bar {
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-small {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--f1-red), #ff4444);
    border-radius: 10px;
    width: 0%;
    transition: width 1s ease;
}

.progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, var(--f1-red), var(--f1-accent));
    border-radius: 2px;
}

/* ============================================
   LOADING SCREEN
============================================ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--f1-dark) 0%, #000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 3s forwards;
}

.loading-content {
    text-align: center;
    animation: pulse 2s infinite;
}

.f1-logo {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: rotate 3s linear infinite;
}

.loading-content h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--f1-red), var(--f1-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: var(--f1-gray);
    border-radius: 2px;
    overflow: hidden;
    margin: 2rem auto;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--f1-red), var(--f1-accent));
    animation: loading 3s ease-in-out forwards;
}

.loading-text {
    color: #888;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ============================================
   HEADER
============================================ */
.dashboard-header {
    background: rgba(21, 21, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--f1-red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: var(--f1-red);
}

#escuderia-nombre {
    font-family: var(--font-title);
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--f1-light), var(--f1-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.team-tag {
    background: var(--f1-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-menu {
    position: relative;
}

.user-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--f1-red);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--f1-gray);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    min-width: 200px;
    margin-top: 0.5rem;
    display: none;
    box-shadow: var(--shadow-lg);
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--f1-accent);
}

/* ============================================
   NAVIGATION
============================================ */
.tabs-navigation {
    display: flex;
    padding: 0 2rem;
    gap: 0.5rem;
    overflow-x: auto;
    background: rgba(0,0,0,0.3);
}

.tab-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 1rem 1.5rem;
    font-family: var(--font-title);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.tab-btn.active {
    color: var(--f1-red);
    border-bottom-color: var(--f1-red);
    background: rgba(225, 6, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* ============================================
   LAYOUTS
============================================ */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.three-columns-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    min-height: 320px;
    align-items: stretch;
}

.col-estrategas {
    flex: 0 0 320px;
    min-height: 320px;
    background: rgba(30, 30, 40, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 210, 190, 0.3);
    padding: 15px;
}

.col-countdown,
.col-fabrica {
    flex: 1;
    min-width: 0;
    min-height: 320px;
    background: rgba(30, 30, 40, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 210, 190, 0.3);
    padding: 15px;
}

/* ============================================
   PILOTOS
============================================ */
.panel-pilotos {
    background: rgba(42, 42, 56, 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 350px;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
}

.pilotos-container {
    margin-top: 20px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    max-height: none;
    overflow: visible;
}

.piloto-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.piloto-card:hover {
    transform: translateY(-5px);
    border-color: var(--f1-accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.piloto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--f1-red), var(--f1-accent);
}

.piloto-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.piloto-name h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.piloto-nacionalidad {
    font-size: 0.9rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.piloto-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.piloto-stat {
    text-align: center;
    flex: 1;
}

.piloto-contract {
    background: rgba(0,0,0,0.3);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

.contract-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.contract-label {
    font-size: 0.9rem;
    color: #aaa;
}

.carreras-restantes {
    font-family: var(--font-title);
    font-weight: bold;
    color: var(--f1-accent);
}

/* ============================================
   ESTRATEGAS COMPACTOS
============================================ */
.estrategas-compact-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    padding: 0;
    margin: 0;
}

.estrategas-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.contador-compact {
    background: rgba(0, 210, 190, 0.2);
    color: #00d2be;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

.estrategas-grid-compact {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    min-height: 0;
}

.estratega-btn-compact {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 0;
}

.estratega-btn-compact.contratado {
    border-color: rgba(0, 210, 190, 0.5);
    background: rgba(0, 210, 190, 0.1);
}

.estratega-btn-compact.vacio {
    border-color: rgba(255, 255, 255, 0.1);
    border-style: dotted;
    background: rgba(255, 255, 255, 0.02);
}

.estratega-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.estratega-icon-compact {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.estratega-btn-compact.contratado .estratega-icon-compact {
    background: rgba(0, 210, 190, 0.2);
    color: #00d2be;
}

.estratega-btn-compact.vacio .estratega-icon-compact {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
}

.estratega-info-mini {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.estratega-nombre-mini {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 80px;
}

.estratega-bono-mini {
    font-size: 0.7rem;
    color: #00d2be;
    font-weight: bold;
}

/* ============================================
   COUNTDOWN
============================================ */
.countdown-section {
    background: linear-gradient(135deg, rgba(21, 21, 30, 0.8), rgba(42, 42, 56, 0.8));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(0, 210, 190, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0,210,190,0.2) 0%, transparent 70%);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.time-block {
    background: rgba(0,0,0,0.5);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-width: 100px;
    text-align: center;
    border: 2px solid rgba(0,210,190,0.3);
}

.time-number {
    display: block;
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--f1-accent), #00ffea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin-top: 0.5rem;
}

.time-separator {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--f1-accent);
    margin: 0 -0.5rem;
}

.proximo-gp {
    text-align: center;
}

#gp-nombre {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.gp-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.gp-date, .gp-circuit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
}

#btn-apostar {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-family: var(--font-title);
    letter-spacing: 1px;
}

/* ============================================
   FÁBRICA/PRODUCCIÓN
============================================ */
.monitor-fabrica {
    background: linear-gradient(135deg, rgba(21, 21, 30, 0.8), rgba(56, 42, 56, 0.8));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(225, 6, 0, 0.3);
}

.alerta-almacen {
    background: linear-gradient(90deg, var(--warning), #ffb347);
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.produccion-actual {
    margin-top: 1.5rem;
}

.pieza-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pieza-tag {
    background: var(--f1-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.progress-container {
    margin: 1.5rem 0;
}

.progress-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
    font-size: 0.9rem;
}

.pieza-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-mini {
    background: rgba(0,0,0,0.3);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-mini span {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 0.25rem;
}

.stat-mini strong {
    display: block;
    font-size: 1.25rem;
    font-family: var(--font-title);
}

.produccion-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================
   ANÁLISIS DE RENDIMIENTO
============================================ */
.analisis-rendimiento {
    background: rgba(42, 42, 56, 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.performance-summary {
    display: flex;
    gap: 2rem;
}

.perf-best, .perf-worst {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.perf-best {
    background: rgba(0, 163, 92, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.perf-worst {
    background: rgba(255, 56, 96, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.areas-coche {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.area-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.area-item:hover {
    transform: translateY(-3px);
    border-color: var(--f1-accent);
}

.area-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--f1-red), var(--f1-accent);
}

.area-nombre {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.area-nivel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.nivel-valor {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--f1-accent);
}

.area-progreso {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 0.75rem;
}

.progreso-valor {
    color: white;
    font-weight: bold;
}

.btn-fabricar {
    width: 100%;
    padding: 0.5rem;
    background: rgba(225, 6, 0, 0.2);
    border: 1px solid var(--f1-red);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-fabricar:hover {
    background: var(--f1-red);
}

/* ============================================
   ESTADÍSTICAS Y CALENDARIO
============================================ */
.panel-estadisticas {
    background: rgba(42, 42, 56, 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.stats-calendar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mini-calendar h3, .quick-stats h3 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--f1-accent);
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-item {
    background: rgba(255,255,255,0.05);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--f1-red);
    transition: all 0.3s ease;
}

.calendar-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.calendar-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.calendar-date {
    font-size: 0.8rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--f1-accent);
}

.stat-title {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
}

/* ============================================
   ALMACÉN
============================================ */
.almacen-tabla {
    width: 100%;
    padding: 20px 0;
}

.area-tabla {
    background: rgba(42, 42, 56, 0.8);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.area-header h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.contador-piezas {
    background: rgba(0, 210, 190, 0.2);
    color: #00d2be;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.piezas-tabla {
    padding: 0;
}

.pieza-fila {
    display: grid;
    grid-template-columns: 50px 80px 100px 120px 120px 1fr;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.pieza-fila:hover {
    background: rgba(255,255,255,0.05);
}

.pieza-fila.equipada {
    background: rgba(0, 210, 190, 0.1);
}

.fila-par {
    background: rgba(255,255,255,0.02);
}

.fila-impar {
    background: rgba(255,255,255,0.01);
}

.celda {
    padding: 0 10px;
}

.celda-icono {
    font-size: 1.5rem;
    text-align: center;
}

.celda-nivel {
    font-family: var(--font-title);
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
}

.badge-puntos {
    background: linear-gradient(135deg, #00d2be, #009688);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
}

.estado-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.estado-badge.equipada {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.estado-badge.disponible {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid #ff9800;
}

.celda-fecha {
    color: #aaa;
    font-size: 0.9rem;
}

.celda-acciones {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-accion {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 80px;
    transition: all 0.3s ease;
}

.btn-equipar {
    background: linear-gradient(135deg, #00d2be, #009688);
    color: white;
}

.btn-equipar:disabled {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-vender {
    background: linear-gradient(135deg, #e10600, #c62828);
    color: white;
}

.btn-accion:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

/* ============================================
   MODALES
============================================ */
.auth-modal, .tutorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-content, .tutorial-content {
    background: linear-gradient(135deg, var(--f1-dark), var(--f1-gray));
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid var(--f1-red);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.tutorial-content {
    border-color: var(--f1-accent);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.auth-content h2, .tutorial-header h2 {
    color: var(--f1-red);
    margin-bottom: 1rem;
}

.tutorial-header h2 {
    color: var(--f1-accent);
    margin: 0;
}

.auth-tabs {
    display: flex;
    margin: 1.5rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    padding: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: var(--f1-accent);
    border-bottom-color: var(--f1-accent);
}

.auth-form {
    margin: 1.5rem 0;
}

.auth-form input, .tutorial-inputs input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
}

.auth-form input:focus, .tutorial-inputs input:focus {
    outline: none;
    border-color: var(--f1-accent);
}

.auth-note {
    color: #888;
    margin: 1rem 0;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 210, 190, 0.3);
}

.tutorial-step {
    background: var(--f1-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.tutorial-body {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.tutorial-inputs {
    margin-top: 1.5rem;
}

.color-picker {
    margin-bottom: 1rem;
}

.color-picker label {
    display: block;
    margin-bottom: 0.5rem;
    color: #aaa;
}

.color-picker input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   NOTIFICACIONES
============================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: var(--f1-red);
}

.notification.info {
    background: #209cee;
}

.notification.warning {
    background: var(--warning);
}

/* ============================================
   FOOTER
============================================ */
.dashboard-footer {
    background: rgba(21, 21, 30, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-title);
    color: #888;
    justify-content: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--f1-accent);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.8rem;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

/* ============================================
   ESTADOS
============================================ */
.empty-state, .empty-almacen, .empty-mercado, .empty-history, .almacen-vacio {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i, .empty-almacen i, .empty-mercado i, .empty-history i, .almacen-vacio i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.hidden {
    display: none !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--f1-red);
    animation: spin 1s linear infinite;
}
/* === ESTILOS PARA BOTONES HORIZONTALES GRANDES === */

.area-botones-fila-horizontal {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) rgba(0,0,0,0.1);
}

.area-botones-fila-horizontal::-webkit-scrollbar {
    height: 8px;
}

.area-botones-fila-horizontal::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.area-botones-fila-horizontal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.boton-pieza-grande {
    flex: 0 0 auto; /* No se encogen */
    width: 180px; /* 3 veces más grande que antes */
    height: 200px; /* Más alto */
    background: linear-gradient(145deg, rgba(30,30,40,0.9), rgba(20,20,30,0.9));
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 16px; /* Bordes redondeados */
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.boton-pieza-grande:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.boton-pieza-grande.equipada-seleccionada {
    border: 3px solid #FFD700;
    background: linear-gradient(145deg, rgba(40,35,20,0.9), rgba(30,25,15,0.9));
    box-shadow: 0 0 30px rgba(255,215,0,0.4), 0 10px 25px rgba(0,0,0,0.3);
}

.boton-pieza-cabecera {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge-nivel {
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
}

.badge-equipada {
    font-size: 14px;
    background: #FFD700;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.boton-pieza-icono {
    font-size: 32px;
    margin: 15px 0;
    opacity: 0.9;
}

.boton-pieza-info {
    margin-bottom: 15px;
}

.puntos-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
}

.puntos-display i {
    color: #FFD700;
}

.boton-pieza-estado {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(255,255,255,0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.boton-pieza-grande.equipada-seleccionada .boton-pieza-estado {
    background: rgba(255,215,0,0.2);
    color: #FFD700;
}

.fila-area-botones {
    margin-bottom: 40px;
    background: rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.area-header-botones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.area-icono-titulo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.area-icono {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.area-nombre {
    font-size: 22px;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}

.area-contador {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.contador-total {
    font-size: 14px;
    opacity: 0.8;
}

.contador-equipadas {
    font-size: 13px;
    color: #FFD700;
    font-weight: 600;
    background: rgba(255,215,0,0.1);
    padding: 4px 10px;
    border-radius: 20px;
}
/* ============================================
   SCROLLBAR
============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--f1-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4444;
}
/* === ESTILOS F1 PARA ALMACÉN === */

.fila-area-f1 {
    background: rgba(10, 10, 15, 0.8);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.area-header-f1 {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(90deg, rgba(20, 20, 30, 0.9), rgba(15, 15, 25, 0.9));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #FF1E00;
}

.area-icono-f1 {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
}

.area-titulo-f1 {
    flex-grow: 1;
}

.area-titulo-f1 h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.area-subtitulo {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.area-equipada-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
}

.equipada-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff00;
    animation: pulse 2s infinite;
}

.equipada-led.off {
    background: #ff0000;
    animation: none;
    opacity: 0.5;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* GRID DE PIEZAS */
.piezas-grid-f1 {
    display: flex;
    gap: 20px;
    padding: 25px;
    overflow-x: auto;
}

/* CARD DE PIEZA F1 */
.pieza-card-f1 {
    flex: 0 0 auto;
    width: 220px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pieza-card-f1:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pieza-card-f1.equipada {
    border: 3px solid;
    box-shadow: 0 0 30px rgba(255, 30, 0, 0.4);
}

.equipada-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 17px;
    pointer-events: none;
    z-index: 1;
}

.pieza-header-f1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pieza-nivel-f1 {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    letter-spacing: 1px;
}

.pieza-puntos-f1 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pieza-icono-f1 {
    text-align: center;
    margin: 25px 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pieza-info-f1 {
    text-align: center;
    margin-bottom: 20px;
}

.pieza-fecha {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: 500;
}

.pieza-id {
    font-size: 10px;
    color: #666;
    font-family: monospace;
    letter-spacing: 1px;
}

/* BOTONES DE ACCIÓN */
.pieza-actions-f1 {
    text-align: center;
}

.btn-equipar-f1 {
    width: 100%;
    padding: 12px;
    background: #FF1E00;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-equipar-f1:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 30, 0, 0.6);
}

.btn-desequipar-f1 {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-desequipar-f1:hover {
    background: rgba(255, 30, 0, 0.2);
    color: #fff;
    border-color: #FF1E00;
}

/* === ESTILOS HORIZONTALES PROFESIONALES === */

.fila-area-horizontal {
    background: rgba(15, 15, 25, 0.8);
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.area-header-horizontal {
    margin-bottom: 20px;
}

.area-icono-titulo-horizontal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.area-icono-horizontal {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid;
}

.area-nombre-horizontal {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.area-subtitulo-horizontal {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
}

/* FILA DE BOTONES HORIZONTALES (UNO DETRÁS DE OTRO) */
.area-botones-fila {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
}

/* BOTÓN GRANDE (3 VECES MÁS GRANDE QUE EL ORIGINAL) */
.boton-pieza-grande-horizontal {
    flex: 0 0 auto; /* No se encoge */
    width: 180px; /* 3 veces más grande que ~60px original */
    height: 180px; /* Cuadrado grande */
    border: 2px solid;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
    background: rgba(30, 30, 40, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* EFECTO HOVER PROFESIONAL */
.boton-pieza-grande-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* ESTILO PARA PIEZA EQUIPADA */
.boton-pieza-grande-horizontal.equipada {
    border-width: 3px;
    box-shadow: 0 0 20px rgba(255, 30, 0, 0.4);
}

.boton-glow {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

/* CONTENIDO DEL BOTÓN */
.boton-contenido-horizontal {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.boton-cabecera-horizontal {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badge-nivel-horizontal {
    font-size: 14px;
    font-weight: 700;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
    letter-spacing: 1px;
}

.badge-equipada-horizontal {
    font-size: 16px;
    background: #00ff00;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.boton-icono-horizontal {
    font-size: 36px;
    margin: 10px 0;
}

.boton-info-horizontal {
    margin-bottom: 10px;
}

.puntos-display-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.boton-estado-horizontal {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.boton-pieza-grande-horizontal.equipada .boton-estado-horizontal {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

/* SCROLLBAR ESTILIZADA */
.area-botones-fila::-webkit-scrollbar {
    height: 6px;
}

.area-botones-fila::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.area-botones-fila::-webkit-scrollbar-thumb {
    background: rgba(255, 30, 0, 0.5);
    border-radius: 3px;
}

.area-botones-fila::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 30, 0, 0.8);
}

/* === ALMACÉN ESTILO F1 === */
.fila-area {
    background: rgba(15, 15, 25, 0.9);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.area-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(20, 20, 30, 0.8);
    border-left: 4px solid;
}

.area-icono {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
}

.area-info {
    flex-grow: 1;
}

.area-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.area-stats {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

.area-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.status-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
}

.status-led.active {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* FILA DE PIEZAS */
.piezas-fila {
    display: flex;
    gap: 15px;
    padding: 20px;
    overflow-x: auto;
}

/* BOTONES DE PIEZA */
.pieza-btn {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border: 2px solid;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
    background: rgba(30, 30, 40, 0.8);
}

.pieza-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.pieza-btn.active {
    border-width: 3px;
    box-shadow: 0 0 25px rgba(255, 30, 0, 0.5);
}

.active-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    opacity: 0.3;
    filter: blur(5px);
    z-index: 1;
}

.pieza-btn-content {
    width: 100%;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.pieza-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pieza-level {
    font-size: 12px;
    font-weight: 700;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 35px;
    text-align: center;
}

.pieza-check {
    font-size: 16px;
    background: #00ff00;
    color: #000;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.pieza-icon {
    font-size: 32px;
    margin: 10px 0;
}

.pieza-points {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.pieza-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pieza-btn.active .pieza-status {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

/* SCROLLBAR */
.piezas-fila::-webkit-scrollbar {
    height: 6px;
}

.piezas-fila::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.piezas-fila::-webkit-scrollbar-thumb {
    background: rgba(255, 30, 0, 0.5);
    border-radius: 3px;
}
/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .two-columns, .stats-calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .three-columns-layout {
        flex-direction: column;
        height: auto;
    }
    
    .col-estrategas, .col-countdown, .col-fabrica {
        width: 100%;
        min-height: 300px;
    }
    
    .col-estrategas {
        flex: 0 0 auto;
    }
    
    .estrategas-grid-compact {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 0.5rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .stats-header {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .stat-card {
        min-width: 120px;
        padding: 0.5rem 0.75rem;
    }
    
    .tabs-navigation {
        padding: 0 0.5rem;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .countdown-timer {
        flex-wrap: wrap;
    }
    
    .time-block {
        min-width: 80px;
        padding: 1rem;
    }
    
    .time-number {
        font-size: 2rem;
    }
    
    .pieza-fila {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .celda {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .celda::before {
        content: attr(data-label);
        font-weight: bold;
        color: #aaa;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .celda-icono::before { content: 'Tipo:'; }
    .celda-nivel::before { content: 'Nivel:'; }
    .celda-puntos::before { content: 'Puntos:'; }
    .celda-estado::before { content: 'Estado:'; }
    .celda-fecha::before { content: 'Fabricada:'; }
    .celda-acciones::before { content: 'Acciones:'; }
    
    .celda-acciones {
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo, .footer-status {
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .footer-logo, .footer-status {
        justify-content: flex-start;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
    
    .footer-status {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .dashboard-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .two-columns {
        grid-column: 1 / -1;
    }
    
    .panel-pilotos, .analisis-rendimiento, .panel-estadisticas {
        grid-column: 1 / -1;
    }
}

/* ============================================
   ESTILOS MINIMALISTAS TIPO TALLER
   Para sobrescribir los estilos inline feos
============================================ */

/* 1. CONTENEDOR HORIZONTAL MINIMALISTA */
.piezas-fila-almacen {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    padding: 15px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    min-height: 120px !important;
    background: rgba(20, 20, 30, 0.3) !important;
    border-radius: 10px !important;
    margin-top: 10px !important;
}

/* 2. BOTONES MINIMALISTAS - COMO EL TALLER */
.pieza-boton-almacen {
    /* Reset de estilos inline */
    min-width: 80px !important;
    max-width: 80px !important;
    height: 80px !important;
    padding: 12px !important;
    margin: 0 !important;
    
    /* Estilos minimalistas */
    border: 2px solid #333 !important;
    border-radius: 12px !important;
    background: rgba(30, 30, 40, 0.9) !important;
    
    /* Layout */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Efectos */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0 !important;
    
    /* Quitar gradientes y efectos complejos */
    background-image: none !important;
    position: static !important;
}

/* 3. COLOR DINÁMICO SIMPLE */
.pieza-boton-almacen[data-color] {
    border-color: var(--border-color, #333) !important;
}

/* 4. ESTADO EQUIPADO MINIMALISTA */
.pieza-boton-almacen.equipada {
    border-width: 3px !important;
    border-color: attr(data-color) !important;
    background: rgba(var(--color-rgb), 0.15) !important;
    box-shadow: 
        0 0 15px attr(data-color),
        inset 0 0 10px rgba(var(--color-rgb), 0.2) !important;
    transform: translateY(-2px) !important;
}

/* Quitar animación F1 glow */
.pieza-boton-almacen.equipada {
    animation: none !important;
}

/* 5. HOVER SIMPLE */
.pieza-boton-almacen:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(var(--color-rgb, 100, 100, 100), 0.3) !important;
    border-width: 2px !important;
}

/* 6. QUITAR EFECTO DE RAYAS */
.pieza-boton-almacen::before {
    display: none !important;
}

/* 7. ICONO GRANDE (como el taller) */
.pieza-icono-grande {
    font-size: 2.2rem !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    text-shadow: 0 0 10px currentColor !important;
    filter: drop-shadow(0 0 5px currentColor) !important;
}

/* 8. NIVEL SIMPLE */
.pieza-nivel {
    font-size: 0.8rem !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: bold !important;
    min-width: auto !important;
    text-align: center !important;
}

/* 9. QUITAR PUNTOS Y CALIDAD (como el taller) */
.pieza-puntos,
.pieza-calidad,
.pieza-cabecera,
.equipada-indicador,
.pieza-info,
.pieza-accion {
    display: none !important;
}

/* 10. CHECK SIMPLE (si quieres mantenerlo) */
.checkmark-equipada {
    display: inline-block !important;
    color: attr(data-color) !important;
    font-size: 1rem !important;
    margin-left: 4px !important;
    font-weight: bold !important;
}

/* 11. AREA HEADER MINIMALISTA */
.area-header-almacen {
    padding: 15px !important;
    background: rgba(25, 25, 35, 0.8) !important;
    border-left: 6px solid !important;
    border-bottom: none !important;
}

.area-icono-almacen {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5rem !important;
    margin-right: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.area-titulo-almacen h3 {
    font-size: 1.1rem !important;
    margin-bottom: 4px !important;
}

.area-titulo-almacen span {
    font-size: 0.8rem !important;
    color: #888 !important;
}

/* 12. FILA DE ÁREA SIMPLE */
.fila-area-almacen {
    background: rgba(20, 25, 35, 0.6) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
}
