/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
    padding: 0 20px;
}

/* Navegaci¨®n */
nav {
    background: #34495e;
    padding: 0.5rem 0;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0 20px;
}

nav ul li {
    margin-right: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: #3d566e;
    border-radius: 4px;
}

/* Formularios */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2c3e50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Botones */
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    margin: 5px 0;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-secondary {
    background: #7f8c8d;
}

.btn-secondary:hover {
    background: #6c7a7d;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Alertas */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Login */
.login-container {
    width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Dashboard */
.dashboard-stats {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    padding: 20px;
    width: 30%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
}

/* Repuestos */
.repuestos-container {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

.repuesto-item {
    margin-bottom: 10px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.repuesto-item:last-child {
    border-bottom: none;
}

/* Detalles del veh¨ªculo */
.vehicle-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.detail-label {
    font-weight: bold;
}

/* Media Queries para dispositivos m¨®viles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .container {
        padding: 10px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-stats {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
        margin-bottom: 15px;
    }

    .login-container {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .vehicle-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.vehicle-details > * {
    flex: 1 1 300px;
    min-width: 300px;
}
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label, .detail-value {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        display: block;
    }
    
    thead, tbody, tr, th, td {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }
    
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
    }
    
    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
    }
}