/* estilos_formularios.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: url('../img/fondo.avif') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: -1;
}

h2 {
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    text-align: center;
}

h3 {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

h4 {
    color: white;
    text-align: center;
}

.volver-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #bbb;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.volver-link:hover {
    color: white;
}

/* ===== CARRUSEL DESLIZABLE ===== */
.cards-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    width: 100vw;
    /* Asegura que tome todo el ancho */
    max-width: 100%;
    padding: 20px 40px 40px;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hacemos el scroll visible pero sutil para confirmar que existe */
    scrollbar-width: auto;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.cards-container::-webkit-scrollbar {
    height: 6px;
}

.cards-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.machine-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    min-width: 280px;
    max-width: 300px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.machine-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
}

.machine-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.machine-card:hover .machine-img {
    transform: scale(1.08);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.card-subtitle {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 2px;
}

.card-stats {
    flex: 1;
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.88rem;
}

.stat-label {
    color: #888;
}

.stat-value {
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-blue {
    background: #1976d2;
    color: white;
    box-shadow: 0 0 10px rgba(25, 118, 210, 0.4);
}

.btn-blue:hover {
    background: #2196f3;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

.btn-red {
    background: #f44336;
    color: white;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.4);
}

.btn-red:hover {
    background: #ff5252;
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.6);
}

.btn-purple {
    background: #9c27b0;
    color: white;
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.4);
}

.btn-purple:hover {
    background: #ba68c8;
    box-shadow: 0 0 20px rgba(186, 104, 200, 0.6);
}

.btn-warning {
    background: #ff9800;
    color: white;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}

.btn-warning:hover {
    background: #ffb74d;
    box-shadow: 0 0 20px rgba(255, 183, 77, 0.6);
}

.btn-excel {
    background: #2e7d32;
    color: white;
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.4);
}

.btn-excel:hover {
    background: #388e3c;
    box-shadow: 0 0 20px rgba(56, 142, 60, 0.6);
}

.search-form {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 25px;
    border-radius: 15px;
    width: 100%;
    max-width: 480px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: center;
}

.search-form input,
.search-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

.search-form input::placeholder {
    color: #666;
}

/* ===== STATUS COLORS (Traffic Light) ===== */
.status-overdue {
    background: rgba(244, 67, 54, 0.15) !important;
    border-left: 5px solid #f44336 !important;
}
.status-overdue td {
    color: #ffcdd2 !important;
    font-weight: bold;
}

.status-warning {
    background: rgba(255, 152, 0, 0.1) !important;
    border-left: 5px solid #ff9800 !important;
}
.status-warning td {
    color: #ffe0b2 !important;
    font-weight: bold;
}

.status-ok {
    background: rgba(76, 175, 80, 0.05) !important;
    border-left: 5px solid #4caf50 !important;
}
.status-ok td {
    color: #c8e6c9 !important;
}

/* Glow effects for text status */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
}
.badge-red { background: #f44336; box-shadow: 0 0 10px rgba(244, 67, 54, 0.5); color: white; }
.badge-yellow { background: #ff9800; box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); color: black; }
.badge-green { background: #4caf50; box-shadow: 0 0 10px rgba(76, 175, 80, 0.5); color: white; }

/* Glass Table */
.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 15px;
}
.glass-table th {
    padding: 12px;
    text-align: left;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.glass-table tr {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}
.glass-table tr:hover {
    background: rgba(255, 255, 255, 0.08);
}
.glass-table td {
    padding: 15px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.glass-table td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.glass-table td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin: 20px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-width:600px) {
    .machine-card {
        min-width: 82vw;
    }
    .glass-table, .glass-table thead, .glass-table tbody, .glass-table tr, .glass-table td {
        display: block;
        width: 100%;
    }
    .glass-table thead { display: none; }
    .glass-table tr { 
        margin-bottom: 20px; 
        background: rgba(255, 255, 255, 0.06); 
        border-radius: 15px; 
        padding: 15px; 
        border-left: none !important;
    }
    .glass-table td { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        border: none !important; 
        padding: 10px 0; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    .glass-table td:last-child { border-bottom: none !important; }
    .glass-table td::before { 
        content: attr(data-label); 
        font-weight: bold; 
        color: rgba(255, 255, 255, 0.4); 
        font-size: 0.75rem; 
        text-transform: uppercase;
    }
}